cachetools icon indicating copy to clipboard operation
cachetools copied to clipboard

Evaluate use of descriptors to improve @cachedmethod usability

Open tkem opened this issue 6 months ago • 1 comments

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...

tkem avatar Jun 16 '25 19:06 tkem

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?

tkem avatar Nov 24 '25 22:11 tkem