Jeedom Core

RedisCache
in package

Redis cache engine implementation

Stores cache entries in Redis key-value store

Tags
see
cache

Main cache class

Table of Contents

Properties

$connection  : Redis|null

Methods

all()  : array<string|int, cache|null>
Get all cache entries
delete()  : void
Delete a cache entry
deleteAll()  : bool
Delete all cache entries
fetch()  : cache|null
Fetch a cache entry by key
getConnection()  : Redis
Get Redis connection
isOk()  : bool
Check if Redis extension is available
save()  : void
Save a cache entry

Properties

$connection

private static Redis|null $connection = \null

Redis connection instance

Methods

all()

Get all cache entries

public static all() : array<string|int, cache|null>
Return values
array<string|int, cache|null>

Array of cache objects

delete()

Delete a cache entry

public static delete(string $_key) : void
Parameters
$_key : string

Cache key

deleteAll()

Delete all cache entries

public static deleteAll() : bool
Return values
bool

Success of operation

fetch()

Fetch a cache entry by key

public static fetch(string $_key) : cache|null
Parameters
$_key : string

Cache key

Return values
cache|null

Cache object or null if not found

getConnection()

Get Redis connection

public static getConnection() : Redis
Return values
Redis

Redis connection instance

isOk()

Check if Redis extension is available

public static isOk() : bool
Return values
bool

True if Redis can be used

save()

Save a cache entry

public static save(cache $_cache) : void
Parameters
$_cache : cache

Cache object to save


        
On this page

Search results