[issue17528] Implement dumps/loads for lru_cache

2016-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the idea did have some merit and I appreciate your submitting it. The issues are that the net gain likely isn't worth the API complication, that it opens a can worms (about manipulating the cache contents beyond load and store), and that it is at

[issue17528] Implement dumps/loads for lru_cache

2016-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking this as rejected for the reasons mentions by me and Antoine. -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue17528] Implement dumps/loads for lru_cache

2014-07-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: That doesn't sound like a good idea. lru_cache is a decorator, that acts as transparently as possible (i.e. the decorated function has the same metadata and appearance as the original function). Therefore, the lru_cache'd function should also pickle as a

[issue17528] Implement dumps/loads for lru_cache

2014-07-18 Thread Mark Lawrence
Mark Lawrence added the comment: https://pypi.python.org/pypi/fastcache/0.4.0 also seems relevant. -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17528

[issue17528] Implement dumps/loads for lru_cache

2014-07-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Have you seen something like this done for other implementations of LRU caches? To me, the idea seems to be at odds with the idea of retaining only the last n calls in memory -- suggesting that a refreshing an outdated entry is cheaper than retiring it

[issue17528] Implement dumps/loads for lru_cache

2013-03-23 Thread Francesco Frassinelli
New submission from Francesco Frassinelli: Hi, I propose to change the public API of functools.lru_cache in order to make the cache persistent when the program is restarted. It could be implemented using two different functions (dumps/loads), where the cached is exported into a classical

[issue17528] Implement dumps/loads for lru_cache

2013-03-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Library (Lib) nosy: +anacrolix, ezio.melotti, rhettinger versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17528