cachetools
cachetools copied to clipboard
Evaluate use of descriptors to improve @cachedmethod usability
Evaluate how switching @cachedmethod to a descriptor based implementation could improve usability, especially regarding the use of cache , cache_key, etc. attributes, ultimately adding a sensible cache_info implementation.
See https://github.com/tkem/cachetools/tree/dev/cachedmethod-descriptors for work in progress...
Note that chaining descriptors, i.e. using descriptors with @classmethod was deprecated in Python 3.11 and removed in Python 3.13.
So, eventually, a seperate @cachedclassmethod decorator might make sense?