ICacheStorage
in
Table of Contents
Methods
- clear() : bool
- Clear all cache entries
- delete() : bool
- Delete cache entry
- exists() : bool
- Check if cache key exists
- gc() : int
- Run garbage collection to remove expired cache entries
- isExpired() : bool
- Check if cache entry is expired
- read() : string|null
- Read content from cache
- write() : bool
- Write content to cache
Methods
clear()
Clear all cache entries
public
clear() : bool
Return values
booldelete()
Delete cache entry
public
delete(string $Key) : bool
Parameters
- $Key : string
Return values
boolexists()
Check if cache key exists
public
exists(string $Key) : bool
Parameters
- $Key : string
Return values
boolgc()
Run garbage collection to remove expired cache entries
public
gc() : int
Return values
int —Number of entries removed
isExpired()
Check if cache entry is expired
public
isExpired(string $Key) : bool
Parameters
- $Key : string
Return values
boolread()
Read content from cache
public
read(string $Key) : string|null
Parameters
- $Key : string
Return values
string|nullwrite()
Write content to cache
public
write(string $Key, string $Content, int $Ttl) : bool
Parameters
- $Key : string
- $Content : string
- $Ttl : int