PredisCache
class PredisCache extends CacheProvider (View source)
Predis cache provider.
Constants
DOCTRINE_NAMESPACE_CACHEKEY |
|
Methods
Sets the namespace to prefix all cache ids with.
Returns an associative array of values for keys is found in cache.
Returns a boolean value indicating if the operation succeeded.
Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it.
Fetches an entry from the cache.
Tests if an entry exists in the cache.
Default implementation of doSaveMultiple. Each driver that supports multi-put should override it.
Puts data into the cache.
Default implementation of doDeleteMultiple. Each driver that supports multi-delete should override it.
Deletes a cache entry.
Flushes all cache entries.
Retrieves cached information from the data store.
No description
Details
in CacheProvider at line 58
void
setNamespace(string $namespace)
Sets the namespace to prefix all cache ids with.
in CacheProvider at line 69
string
getNamespace()
Retrieves the namespace that prefixes all cache ids.
in CacheProvider at line 77
mixed
fetch(string $id)
Fetches an entry from the cache.
in CacheProvider at line 85
mixed[]
fetchMultiple(array $keys)
Returns an associative array of values for keys is found in cache.
in CacheProvider at line 110
bool
saveMultiple(array $keysAndValues, int $lifetime = 0)
Returns a boolean value indicating if the operation succeeded.
in CacheProvider at line 123
bool
contains(string $id)
Tests if an entry exists in the cache.
in CacheProvider at line 131
bool
save(string $id, mixed $data, int $lifeTime = 0)
Puts data into the cache.
If a cache entry with the given id already exists, its data will be replaced.
in CacheProvider at line 139
bool
deleteMultiple(array $keys)
Deletes several cache entries.
in CacheProvider at line 147
bool
delete(string $id)
Deletes a cache entry.
in CacheProvider at line 155
array|null
getStats()
Retrieves cached information from the data store.
The server's statistics array has the following values:
hits Number of keys that have been requested and found present.
misses Number of items that have been requested and not found.
uptime Time that the server is running.
memory_usage Memory used by this server to store items.
memory_available Memory allowed to use for storage.
in CacheProvider at line 163
bool
flushAll()
Flushes all cache entries, globally.
in CacheProvider at line 171
bool
deleteAll()
Deletes all cache entries in the current cache namespace.
at line 62
protected array
doFetchMultiple(array $keys)
Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it.
at line 49
protected mixed|false
doFetch(string $id)
Fetches an entry from the cache.
at line 100
protected bool
doContains(string $id)
Tests if an entry exists in the cache.
at line 72
protected bool
doSaveMultiple(array $keysAndValues, int $lifetime = 0)
Default implementation of doSaveMultiple. Each driver that supports multi-put should override it.
at line 108
protected bool
doSave(string $id, string $data, int $lifeTime = 0)
Puts data into the cache.
at line 131
protected bool
doDeleteMultiple(array $keys)
Default implementation of doDeleteMultiple. Each driver that supports multi-delete should override it.
at line 123
protected bool
doDelete(string $id)
Deletes a cache entry.
at line 139
protected bool
doFlush()
Flushes all cache entries.
at line 149
protected array|null
doGetStats()
Retrieves cached information from the data store.