Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, maxsize, missing=None, getsizeof=None):
Cache.__init__(self, maxsize, missing=missing, getsizeof=getsizeof)
self.__order = collections.OrderedDict()
def __init__(self, maxsize, getsizeof=None):
if getsizeof is not None:
Cache.__init__(self, maxsize, lambda e: getsizeof(e[0]))
else:
Cache.__init__(self, maxsize)
def __init__(self, maxsize, getsizeof=None):
if getsizeof is not None:
Cache.__init__(self, maxsize, lambda e: getsizeof(e[0]))
else:
Cache.__init__(self, maxsize)
root = _Link()
root.prev = root.next = root
self.__root = root
def __init__(self, maxsize, getsizeof=None):
if getsizeof is not None:
Cache.__init__(self, maxsize, lambda e: getsizeof(e[0]))
else:
Cache.__init__(self, maxsize)
root = _Link()
root.prev = root.next = root
self.__root = root
def __init__(self, maxsize, ttl=MAXTTL, timer=time.time, getsizeof=None):
Cache.__init__(self, maxsize, getsizeof)
self.__root = root = _Link()
root.prev = root.next = root
self.__links = collections.OrderedDict()
self.__timer = _Timer(timer)
self.__ttl = ttl
# CHANGE: .set() is the same as setitem
self.set = self.__setitem__
def __init__(self, maxsize, getsizeof=None):
if getsizeof is not None:
Cache.__init__(self, maxsize, lambda e: getsizeof(e[0]))
else:
Cache.__init__(self, maxsize)