FileStorage
class FileStorage 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
mixed
read(string $key)
Read from cache.
void
lock(string $key)
Prevents item reading and writing. Lock is released by write() or remove().
void
write(string $key, mixed $data, array $dp)
Writes item into the cache.
void
remove(string $key)
Removes item from the cache.
void
clean(array $conditions)
Removes items from the cache by conditions.
array|null
readMetaAndLock(string $file, int $lock)
Reads cache data from disk.
mixed
readData(array $meta)
Reads cache data from disk and closes cache file handle.
string
getCacheFile(string $key)
Returns file name.
Details
at line 65
__construct($dir, IJournal $journal = null)
No description
at line 81
mixed
read(string $key)
Read from cache.
at line 132
void
lock(string $key)
Prevents item reading and writing. Lock is released by write() or remove().
at line 146
void
write(string $key, mixed $data, array $dp)
Writes item into the cache.
at line 225
void
remove(string $key)
Removes item from the cache.
at line 232
void
clean(array $conditions)
Removes items from the cache by conditions.
at line 300
protected array|null
readMetaAndLock(string $file, int $lock)
Reads cache data from disk.
at line 330
protected mixed
readData(array $meta)
Reads cache data from disk and closes cache file handle.
at line 349
protected string
getCacheFile(string $key)
Returns file name.
Traits
SmartObject