def __init__(self, threshold=500, default_timeout=300): BaseCache.__init__(self, default_timeout=default_timeout) self._mutex = threading.RLock() self._cache = {} self._bypassed = set() self.clear = self._cache.clear self._threshold = threshold
def __init__(self, servers=None, default_timeout=300, key_prefix=None, username=None, password=None): BaseCache.__init__(self, default_timeout) if servers is None: servers = ['127.0.0.1:11211'] import pylibmc self._client = pylibmc.Client(servers, username=username, password=password, binary=True) self.key_prefix = key_prefix
def __init__(self, default_timeout=300): CachelibBaseCache.__init__(self, default_timeout=default_timeout) self.ignore_errors = False
def _factory(self, *args, **kwargs): return BaseCache(*args, **kwargs)
def __init__(self, default_timeout=500): BaseCache.__init__(self, default_timeout) self.key_prefix = CENDR_VERSION