Neuron-PHP

ICacheStorage

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
bool

delete()

Delete cache entry

public delete(string $Key) : bool
Parameters
$Key : string
Return values
bool

exists()

Check if cache key exists

public exists(string $Key) : bool
Parameters
$Key : string
Return values
bool

gc()

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
bool

read()

Read content from cache

public read(string $Key) : string|null
Parameters
$Key : string
Return values
string|null

write()

Write content to cache

public write(string $Key, string $Content, int $Ttl) : bool
Parameters
$Key : string
$Content : string
$Ttl : int
Return values
bool

        
On this page

Search results