Inherits from redis.client.Redis
Redis client that will automatically prefix conf.db_name
No docs
Delete keys with wildcard *
.
delete_value (self, keys, user=None, make_keys=True)
Delete value, list of values.
No docs
Return keys starting with key
.
get_value (self, key, generator=None, user=None, expires=False)
Returns cache value. If not found and generator function is given, it will call the generator.
param key: Cache key.
param generator: Function to be called to generate a value if None
is returned.
param expires: If the key is supposed to be with an expiry, don't store it in frappe.local
No docs
hdel_keys (self, name_starts_with, key)
Delete hash names with wildcard *
and key
hget (self, name, key, generator=None)
No docs
No docs
No docs
make_key (self, key, user=None)
No docs
set_value (self, key, val, user=None, expires_in_sec=None)
Sets cache value.
Parameters:
key
- Cache keyval
- Value to be cacheduser
- Prepends key with Userexpires_in_sec
- Expire value of this key in X seconds