Class FileStorage (namespace Nette\Caching)
Cache file storage.
Object | --FileStorage
Implements interfaces:
Direct Known Sub-classes:
Public Method Summary | |
---|---|
void |
clean
($conds)
Removes items from the cache by conditions & garbage collector.
|
FileStorage |
__construct
($dir)
|
mixed|NULL |
read
(string $key)
Read from cache.
|
void |
remove
(string $key)
Removes item from the cache.
|
void |
write
(string $key, mixed $data, $dp)
Writes item into the cache.
|
Protected Method Summary | |
---|---|
protected string |
getCacheFile
(string $key)
Returns file name.
|
protected resource |
getDb
()
Returns SQLite resource.
|
protected mixed |
readData
(array $meta)
Reads cache data from disk and closes cache file handle.
|
protected array|NULL |
readMeta
(string $file, int $lock)
Reads cache data from disk.
|
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Constant Summary | |||
---|---|---|---|
string | FILE |
'file' |
line 46 additional cache structure |
string | HANDLE |
'handle' |
line 47 additional cache structure |
Variable Summary | ||||
---|---|---|---|---|
static float | $gcProbability | 0.001 |
line 52 probability that the clean() routine is started |
|
static bool | $useDirectories |
|
line 55 |
Method Details | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 276 cleanpublic void clean ($conds) Removes items from the cache by conditions & garbage collector. Implementation of:
|
||||||||||||||||||
line 399 getCacheFileprotected string getCacheFile (string $key) Returns file name. Overridden in child classes as:
|
||||||||||||||||||
line 441 getDbprotected resource getDb () Returns SQLite resource.
|
||||||||||||||||||
line 68 __constructpublic FileStorage __construct ($dir)
|
||||||||||||||||||
line 102 readpublic mixed|NULL read (string $key) Read from cache. Implementation of:
|
||||||||||||||||||
line 380 readDataprotected mixed readData (array $meta) Reads cache data from disk and closes cache file handle. Overridden in child classes as:
|
||||||||||||||||||
line 349 readMetaprotected array|NULL readMeta (string $file, int $lock) Reads cache data from disk.
|
||||||||||||||||||
line 264 removepublic void remove (string $key) Removes item from the cache. Implementation of:
|
||||||||||||||||||
line 160 writepublic void write (string $key, mixed $data, $dp) Writes item into the cache. Implementation of:
|