Whilst I appreciate that it might be an odd thing to do, it's something we did to (try to) disable the cache. I think there are two options: change the code to actually enforce a size of 0 or to raise an error if passed a size of 0.
I'm happy to try writing a Pull Request for either one, though I think the latter will be simpler.
If you create an
LRUCache
with a max_size of 0, it actually effectively creates a cache with a max_size of 1.Whilst I appreciate that it might be an odd thing to do, it's something we did to (try to) disable the cache. I think there are two options: change the code to actually enforce a size of 0 or to raise an error if passed a size of 0.
I'm happy to try writing a Pull Request for either one, though I think the latter will be simpler.