Redis
in package
This class will manage the Redis connections.
Tags
Table of Contents
get() | Returns the data stored on the given Redis key. | : string|null |
---|---|---|
getKeyPrefix() | Returns the if Redis key prefix to use. | : string |
getRedisConnection() | Returns the Redis connection for this petition. | : Client |
isEnabled() | Returns the if Redis is enabled. | : bool |
set() | Sets a Redis key with the given value. | : void |
Methods
get()
Returns the data stored on the given Redis key.
public
static get(string $key) : string|null
Parameters
- $key : string
-
Name of the Redis key you want to get.
Return values
string|null —getKeyPrefix()
Returns the if Redis key prefix to use.
public
static getKeyPrefix() : string
Return values
string —getRedisConnection()
Returns the Redis connection for this petition.
public
static getRedisConnection() : Client
Return values
Client —isEnabled()
Returns the if Redis is enabled.
public
static isEnabled() : bool
Return values
bool —set()
Sets a Redis key with the given value.
public
static set(string $key, mixed $value[, int $ttl = null ]) : void
Parameters
- $key : string
- $value : mixed
- $ttl : int = null