FileStorage
class FileStorage extends Object implements IStorage
Cache file storage.
Constants
internal META_HEADER_LEN |
|
internal META_TIME |
|
internal META_SERIALIZED |
|
internal META_EXPIRE |
|
internal META_DELTA |
|
internal META_ITEMS |
|
internal META_CALLBACKS |
|
FILE |
additional cache structure |
HANDLE |
additional cache structure |
Properties
static float | $gcProbability | ||
static bool | $useDirectories |
Methods
Read from cache.
Prevents item reading and writing. Lock is released by write() or remove().
Writes item into the cache.
Removes item from the cache.
Removes items from the cache by conditions & garbage collector.
Reads cache data from disk.
Reads cache data from disk and closes cache file handle.
Returns file name.
Details
at line 64
__construct($dir, IJournal $journal = NULL)
No description
at line 85
mixed|null
read($key)
Read from cache.
at line 142
void
lock($key)
Prevents item reading and writing. Lock is released by write() or remove().
at line 163
void
write($key, $data, array $dp)
Writes item into the cache.
at line 248
void
remove($key)
Removes item from the cache.
at line 260
void
clean(array $conditions)
Removes items from the cache by conditions & garbage collector.
at line 316
protected array|null
readMetaAndLock($file, $lock)
Reads cache data from disk.
at line 348
protected mixed
readData($meta)
Reads cache data from disk and closes cache file handle.
at line 367
protected string
getCacheFile($key)
Returns file name.