lonelyenvoy / python-memoization

A powerful caching library for Python, with TTL support and multiple algorithm options.
MIT License
230 stars 15 forks source link

Added fix that addresses issue #2 - cache with ttl and max size is no… #4

Closed prathyushark closed 4 years ago

prathyushark commented 4 years ago

…t working as expected

Link to issue: https://github.com/lonelyenvoy/python-memoization/issues/2

lonelyenvoy commented 4 years ago

Hi Prathyusha,

Thanks for spending time and effort to read the code and fix issues.

Your code works in some scenes, but not all. Since you did not specify a ttl when calling make_cache_value, it only works when the ttl feature is not enabled. The test code works fine. I will accept your pull request, and make some small changes based on it. Hope you enjoy using this tool! :D

lonelyenvoy commented 4 years ago

I have added you to the contributors list. Well done!