kids.cache
kids.cache copied to clipboard
Using WeakValueDictionary as a cachestore
This is a copy of Thomas Kemmer email suggestion::
A last one for today: I only recently came across
https://docs.python.org/3/library/weakref.html
I think
WeakValueDictionarymakes for a very interesting "standard" cache-like class. Maybe you don't want to replace good olddictas your default, but you should definitely check your decorator works with it, and maybe say so in the docs. Since it's quite a new thing, even seasoned Python programmers may not have heard about it.