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 66
__construct($dir, IJournal $journal = NULL)
No description
at line 87
mixed|null
read($key)
Read from cache.
at line 144
void
lock($key)
Prevents item reading and writing. Lock is released by write() or remove().
at line 165
void
write($key, $data, array $dp)
Writes item into the cache.
at line 250
void
remove($key)
Removes item from the cache.
at line 262
void
clean(array $conditions)
Removes items from the cache by conditions & garbage collector.
at line 318
protected array|null
readMetaAndLock($file, $lock)
Reads cache data from disk.
at line 350
protected mixed
readData($meta)
Reads cache data from disk and closes cache file handle.
at line 369
protected string
getCacheFile($key)
Returns file name.