On Fri, Oct 16, 2020 at 4:51 AM Ram Rachum <r...@rachum.com> wrote: > > Hi everyone, > > For many years, I've used a `cache` decorator that I built for caching Python > functions. Then `functools.lru_cache` was implemented, which is much more > standard. However, as far as I know, it holds normal references to its keys, > rather than weak references. This means that it can cause memory leaks when > it's storing items that don't have any references elsewhere. This often makes > me reluctant to use it. > > What do you think about supporting weakrefs in for keys lru_cache? >
-1; you can always build your own when you need special purpose differences like weakrefs. ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/4FB7KYVOQBE7VIW27F7VHUSCZKYB2YJZ/ Code of Conduct: http://python.org/psf/codeofconduct/