- Class name: Redis
- Namespace: JSMF\Cache
- This class implements: JSMF\Cache\CacheInterface
Boolean JSMF\Cache\CacheInterface::connect()
connects to server if not already connected, returns status
- Visibility: public
- This method is static.
- This method is defined by JSMF\Cache\CacheInterface
mixed JSMF\Cache\Redis::selectDBIndex(integer $index)
switches the active dbindex
- Visibility: public
- This method is static.
- $index integer
array JSMF\Cache\Redis::getKeys(String $pattern)
returns all redis keys matching the pattern
- Visibility: public
- This method is static.
- $pattern String
mixed JSMF\Cache\Redis::listPop(String $key)
pops one element of the end of the list
- Visibility: public
- This method is static.
- $key String - <p>key</p>
mixed JSMF\Cache\Redis::listShift(String $key)
shifts an element from the beginning of a list
- Visibility: public
- This method is static.
- $key String - <p>key</p>
mixed JSMF\Cache\Redis::listPush(String $key, mixed $value)
pushes an element to the end of a list
- Visibility: public
- This method is static.
- $key String
- $value mixed
mixed JSMF\Cache\Redis::listUnshift(String $key, mixed $value)
inserts an element to the beginning of the list, moving all existing elements on index further
- Visibility: public
- This method is static.
- $key String
- $value mixed
integer JSMF\Cache\Redis::listCount(String $key)
returns the number of elements in a list
- Visibility: public
- This method is static.
- $key String
Mixed JSMF\Cache\CacheInterface::get(String $key, Mixed $default)
return item from cache
- Visibility: public
- This method is static.
- This method is defined by JSMF\Cache\CacheInterface
- $key String
- $default Mixed
Boolean JSMF\Cache\CacheInterface::set(String $key, Mixed $value, Int|null $expire)
stores value in cache
- Visibility: public
- This method is static.
- This method is defined by JSMF\Cache\CacheInterface
- $key String
- $value Mixed
- $expire Int|null
Boolean JSMF\Cache\CacheInterface::has(String $key)
checks if cache key exists
- Visibility: public
- This method is static.
- This method is defined by JSMF\Cache\CacheInterface
- $key String
Boolean JSMF\Cache\CacheInterface::delete(String $key)
deletes item from cache
- Visibility: public
- This method is static.
- This method is defined by JSMF\Cache\CacheInterface
- $key String