How to use the cachetools.LRUCache.__init__ function in cachetools

To help you get started, we’ve selected a few cachetools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vaexio / vaex / packages / vaex-core / vaex / caching.py View on Github external
def __init__(self, maxsize, missing=None, getsizeof=None, delitem=lambda key: None):
		LRUCache.__init__(self, maxsize, missing, getsizeof)
		self.__delitem = delitem
github vaexio / vaex / packages / vaex-core / vaex / caching.py View on Github external
def __init__(self, maxsize, missing=None, getsizeof=None, delitem=lambda key: None):
		LRUCache.__init__(self, maxsize, missing, getsizeof)
		self.__delitem = delitem
github tkem / cachetools / cachetools.py View on Github external
def __init__(self, maxsize, ttl, getsizeof=None, timer=time.time):
        if getsizeof is not None:
            LRUCache.__init__(self, maxsize, lambda e: getsizeof(e[0]))
        else:
            LRUCache.__init__(self, maxsize)
        root = _Link()
        root.prev = root.next = root
        self.__root = root
        self.__timer = timer
        self.__ttl = ttl
github tkem / cachetools / cachetools.py View on Github external
def __init__(self, maxsize, ttl, getsizeof=None, timer=time.time):
        if getsizeof is not None:
            LRUCache.__init__(self, maxsize, lambda e: getsizeof(e[0]))
        else:
            LRUCache.__init__(self, maxsize)
        root = _Link()
        root.prev = root.next = root
        self.__root = root
        self.__timer = timer
        self.__ttl = ttl