noc.main.models.datasourcecache

Module Contents

noc.main.models.datasourcecache.logger
noc.main.models.datasourcecache.CURRENT_VERSION = 3
noc.main.models.datasourcecache.MAX_DATA_SIZE
class noc.main.models.datasourcecache.DataSourceCache

Bases: mongoengine.document.Document

meta
name
data
expires
chunks
version
next_name
classmethod get_data(cls, name)

Load cached data :param name: :return:

classmethod set_data(cls, name, data, ttl)

Write data to cache :param name: :param data: :param ttl: :return:

classmethod encode(cls, data)

v1 encoding: cPickle + zlib.compress :param data: :return:

classmethod decode(cls, data)

v2 decoding: bz2 :param data: :return: