| package |
jelix |
|---|---|
| subpackage |
kvdb_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 $profile) : void
Initialise profile data and create the main object
array
__destruct() : void
_connect()
_disconnect()
append(string $key, string $value) : string
stringthe key of the value to modify
stringthe value to append to the current key value
stringthe new value or false if failure
decrement(string $key, mixed $decr = 1) : integer
stringthe key of the value
mixedthe value to substract to the current value
integerthe result, or false if failure
delete(string $key) : boolean
stringthe key
booleanfalse if failure
esc( $val)
flush() : boolean
booleantrue if it is a success
garbage() : boolean
booleanfalse if failure
get(string|array $key) : string
string|arraya key or an array of keys
stringor null if the key doesn't exist
getRedis() : \PhpRedis\Redis
\PhpRedis\Redis
getUsedKey( $key)
hDel(string $key, string|array<mixed,string> $hKey) : integer|boolean
string
string|array<mixed,string>
integer|booleanthe number of deleted keys, 0 if the key doesn't exist, FALSE if the key isn't a hash.
hExists(string $key, string $hKey) : boolean
string
stringthe hash key to check
booleantrue if the hash key exists
hGet(string $key, string $hKey) : mixed|boolean
string
stringthe hash key to retrieve
mixed|booleanFALSE if it failed
hGetAll(string $key) : array<mixed,string>
string
array<mixed,string>list of keys and values
hKeys(string $key) : array<mixed,string>
string
array<mixed,string>list of hkeys
hLen(string $key) : integer|boolean
string
integer|booleanthe number of items in a hash, FALSE if the key doesn't exist or isn't a hash.
hMGet(string $key, array<mixed,string> $keys) : array
string
array<mixed,string>list of hash keys to retrieve
arraylist of associative values
hMSet(string $key, array $values) : boolean
string
arrayassociative array with hkeys and values
boolean
hSet(string $key, string $hKey, mixed $value) : integer|boolean
string
stringthe hash key
mixed
integer|boolean1 if value didn't exist and was added successfully, 0 if the value was already present and was replaced, FALSE if there was an error.
hSetNx(string $key, string $hKey, mixed $value) : boolean
string
stringthe hash key
mixed
booleanTRUE if it was set, FALSE if was already present
hStrLen(string $key) : mixed
string
mixed
hVals(string $key) : array<mixed,string>
string
array<mixed,string>list of values (random order)
increment(string $key, mixed $incr = 1) : integer
stringthe key of the value
mixedthe value to add to the current value
integerthe result, or false if failure
insert(string $key, string $value) : boolean
stringthe key
string
booleanfalse if failure
prepend(string $key, string $value) : string
stringthe key of the value to modify
stringthe value to prepend to the current key value
stringthe new value or false if failure
replace(string $key, string $value) : boolean
stringthe key
string
booleanfalse if failure
sAdd( $skey, $value)
sCount( $skey)
set(string $key, string $value) : boolean
stringthe key
string
booleanfalse if failure, if the value is a resource...
setWithTtl(string $key, string $value, integer $ttl) : boolean
stringthe key
stringthe value
integerthe time to live in seconds...
booleanfalse if failure, if the value is a resource...
sPop( $skey)
sRemove( $skey, $value)
unesc( $val)
key_prefix :
key_prefix_flush_method :
direct: uses SCAN and DEL, but it can take huge time jkvdbredisworker: it stores the keys prefix to delete into a redis list named 'jkvdbredisdelkeys'. 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.
_profile : array
| var |
|---|
array
_driverName : string
| var |
|---|
string
_profileName : string
| var |
|---|
string
_connection : object|resource
| var |
|---|
object|resource