noc.core.cache.base

Module Contents

noc.core.cache.base.logger
class noc.core.cache.base.BaseCache

Bases: object

Basic cache class. Follows common dict style like cache[key] = value

static make_key(key, version=None)
get(self, key, default=None, version=None)

Returns value or raise KeyError :param key: :return:

set(self, key, value, ttl=None, version=None)

Set key :param key: :param value: :param ttl: :return:

delete(self, key, version=None)
has_key(self, key, version=None)
get_many(self, keys, version=None)

Fetch a bunch of keys from the cache.

set_many(self, data, ttl=None, version=None)
delete_many(self, keys, version=None)
__getitem__(self, item)
__contains__(self, item)
classmethod get_cache(cls)
noc.core.cache.base.cache