We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04176be commit 3b3be43Copy full SHA for 3b3be43
1 file changed
ipinfo/cache/default.py
@@ -2,16 +2,14 @@
2
A default cache implementation that uses `cachetools` for an in-memory LRU cache.
3
"""
4
5
-import cachetools
6
-
7
from .interface import CacheInterface
8
+from cachetools import TTLCache
9
10
class DefaultCache(CacheInterface):
11
"""Default, in-memory cache."""
12
13
def __init__(self, **cache_options):
14
- self.cache = cachetools.TTLCache(**cache_options)
+ self.cache = TTLCache(**cache_options)
15
16
def __contains__(self, key):
17
return self.cache.__contains__(key)
0 commit comments