Version 6.x.x Source

Class RedisWrapper

Inherits from redis.client.Redis

Redis client that will automatically prefix conf.db_name

delete_key (self)

No docs


delete_keys (self, key)

Delete keys with wildcard *.


delete_value (self, keys, user=None, make_keys=True)

Delete value, list of values.


get_all (self, key)

No docs


get_keys (self, key)

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


hdel (self, name, key)

No docs


hdel_keys (self, name_starts_with, key)

Delete hash names with wildcard * and key


hget (self, name, key, generator=None)

No docs


hkeys (self, name)

No docs


hset (self, name, key, value)

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: