| package |
jelix |
|---|---|
| subpackage |
cache_plugin |
| author |
Yannick Le Guédart |
| contributor |
Laurent Jouanneau |
| copyright |
2009 Yannick Le Guédart, 2010-2016 Laurent Jouanneau |
| link | |
| licence |
http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file |
__construct(array $params)
arraydriver parameters, written in the ini file
decrement(string $key, mixed $decvalue = 1) : boolean
stringkey used for storing data in the cache
mixedvalue used
booleanfalse if failure
delete(string $key) : boolean
stringkey used for storing data in the cache
booleanfalse if failure
esc( $val)
flush() : boolean
If key_prefix is set, only keys with that prefix will be removed. Note that in that case, it can result in a huge performance issue. See key_prefix_flush_method to configure the best method for your app and your server.
booleanfalse if failure
garbage() : boolean
boolean
get(mixed $key) : mixed
mixedkey or array of keys used for storing data in the cache
mixed$data array of data or false if failure
getRedis() : \PhpRedis\Redis
\PhpRedis\Redis
getUsedKey( $key)
increment(string $key, mixed $incvalue = 1) : boolean
stringkey used for storing data in the cache
mixedvalue used
booleanfalse if failure
replace(string $key, mixed $var, integer $ttl) : boolean
stringkey used for storing data in the cache
mixeddata to replace
integerdata time expiration
booleanfalse if failure
set(string $key, mixed $value, integer $ttl) : boolean
stringkey used for storing data
mixeddata to store
integerdata time expiration
booleanfalse if failure
unesc( $val)
profileName : string
| var | |
|---|---|
| access |
public |
string
enabled : boolean
| var | |
|---|---|
| access |
public |
boolean
ttl : boolean
| var | |
|---|---|
| access |
public |
boolean
automatic_cleaning_factor : integer
| var | |
|---|---|
| access |
public |
integer
key_prefix : string
| var | |
|---|---|
| access |
protected |
string
key_prefix_flush_method :
direct: uses SCAN and DEL, but it can take huge time jcacheredisworker: it stores the keys prefix to delete into a redis list named 'jcacheredisdelkeys'. You can use a script to launch a worker which pops from this list prefix of keys to delete, and delete them with SCAN/DEL redis commands. See the redisworker controller in the jelix module. event: send a jEvent. It's up to your application to respond to this event and to implement your prefered method to delete all keys.
redis :
| param |
the redis connection |
|---|---|