FileStorage
class FileStorage implements Storage
Cache file storage.
Constants
| private internal MetaHeaderLen | 
 | 
| private internal MetaTime | 
 | 
| private internal MetaSerialized | 
 | 
| private internal MetaExpire | 
 | 
| private internal MetaDelta | 
 | 
| private internal MetaItems | 
 | 
| private internal MetaCallbacks | 
 | 
| private File | additional cache structure | 
| private Handle | additional cache structure | 
Properties
| static | $gcProbability | probability that the clean() routine is started | 
Methods
No description
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.
Reads cache data from disk.
Reads cache data from disk and closes cache file handle.
Returns file name.
Details
        at line 58
                            
    __construct(string $dir, Journal|null $journal = null)
        
    
    No description
        at line 73
                            mixed
    read(string $key)
        
    
    Read from cache.
        at line 121
                            void
    lock(string $key)
        
    
    Prevents item reading and writing. Lock is released by write() or remove().
        at line 138
                            void
    write(string $key, $data, array $dp)
        
    
    Writes item into the cache.
        at line 219
                            void
    remove(string $key)
        
    
    Removes item from the cache.
        at line 226
                            void
    clean(array $conditions)
        
    
    Removes items from the cache by conditions.
        at line 296
                    protected        array|null
    readMetaAndLock(string $file, int $lock)
        
    
    Reads cache data from disk.
        at line 323
                    protected        mixed
    readData(array $meta)
        
    
    Reads cache data from disk and closes cache file handle.
        at line 336
                    protected        string
    getCacheFile(string $key)
        
    
    Returns file name.