FileStorage extend troubles

Notice: This thread is very old.
Laputa
Member | 1
+
0
-

NFileStorage stores the cache files in one folder but not subfolders. I can create own storage class, who inherit NFileStorage and override protected “getCacheFile” method. But I can't build path in overriden method, because variable “$this->dir” is private. How can I teach NFileStorage save files in subfolders?

Last edited by Laputa (2012-04-14 21:52)

HosipLan
Moderator | 4668
+
0
-

Nope, but you can tell him, to create the folder using namespace.

$storage->write('directory' . Nette\Caching\Cache::NAMESPACE_SEPARATOR . 'key', $data);