AbstractStorage
AbstractYes
Class AbstractStorage Represents the interface for a cache storage
Table of Contents
Methods
- __construct() : mixed
- delete() : int|false
- Deletes the cache Returns the number of deleted bytes
- deleteAll() : bool
- Deletes all cache data in the storage
- exists() : bool
- Returns true if the cache exists
- getLastModified() : int|false
- Returns the time the cache was last modified
- getMd5() : string|false
- Returns md5 hash of the cache
- getSize() : int|false
- Returns cache size
- read() : string|false
- Returns the cache contents
- shouldCountQuota() : bool
- Should we count a quota limit
- write() : bool
- Writes the content to the storage
Methods
__construct()
public
__construct(string $cacheKey, array<string|int, mixed> $configuration, array<string|int, mixed> $htmlCacheOptions) : mixed
Parameters
- $cacheKey : string
-
unique cache identifier
- $configuration : array<string|int, mixed>
-
storage configuration
- $htmlCacheOptions : array<string|int, mixed>
-
html cache options
delete()
Deletes the cache Returns the number of deleted bytes
public
abstract delete() : int|false
Return values
int|falsedeleteAll()
Deletes all cache data in the storage
public
abstract deleteAll() : bool
Return values
boolexists()
Returns true if the cache exists
public
abstract exists() : bool
Return values
boolgetLastModified()
Returns the time the cache was last modified
public
abstract getLastModified() : int|false
Return values
int|falsegetMd5()
Returns md5 hash of the cache
public
abstract getMd5() : string|false
Return values
string|falsegetSize()
Returns cache size
public
abstract getSize() : int|false
Return values
int|falseread()
Returns the cache contents
public
abstract read() : string|false
Return values
string|falseshouldCountQuota()
Should we count a quota limit
public
abstract shouldCountQuota() : bool
Return values
boolwrite()
Writes the content to the storage
public
abstract write(string $content, string $md5) : bool
Parameters
- $content : string
-
the string that is to be written
- $md5 : string
-
the content hash