示例#1
0
文件: flask.py 项目: foosel/OctoPrint
	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
示例#2
0
	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
示例#3
0
    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
示例#4
0
 def __init__(self, default_timeout=300):
     CachelibBaseCache.__init__(self, default_timeout=default_timeout)
     self.ignore_errors = False
示例#5
0
 def __init__(self, default_timeout=500):
     BaseCache.__init__(self, default_timeout)
     self.key_prefix = CENDR_VERSION