In functools.lru_cache() you can specify maxsize=None if you want to allow the cache to grow indefinitely.
If you try to do this with ring.lru(maxsize=None), however, you will run into a TypeError on line 117 of lru_cache.py when cache_len() is compared with maxsize, since the former is an integer and you have specified None for the latter.
Proposed fix:
Change the code in lru_cache.py to skip this bounds check if maxsize is None.
In
functools.lru_cache()
you can specifymaxsize=None
if you want to allow the cache to grow indefinitely.If you try to do this with ring.lru(maxsize=None), however, you will run into a
TypeError
on line 117 oflru_cache.py
whencache_len()
is compared withmaxsize
, since the former is an integer and you have specifiedNone
for the latter.Proposed fix: Change the code in
lru_cache.py
to skip this bounds check ifmaxsize is None
.