Closed GoogleCodeExporter closed 9 years ago
The Python version is 2.7.2
Original comment by sha...@glossi.com
on 25 Oct 2013 at 1:11
Fixed in source code.
I'm going to delay releasing it on PyPI just in case yet another issue arrives.
This issue arrived only an hour after the last release, and I prefer not to
release more than day!
Original comment by re...@mrabarnett.plus.com
on 25 Oct 2013 at 3:25
[deleted comment]
functool.lru_cache may be a better solution(instead of random.sample).
Python 3 only, but can backport to Python 2 since it's pure Python
Original comment by Lyricconch
on 25 Oct 2013 at 11:20
The code was suggested as a better way of handling it than just clearing the
entire cache if it's full.
I think I'll leave keep it as-is unless you can prove that some other way is
definitely better.
Original comment by re...@mrabarnett.plus.com
on 25 Oct 2013 at 5:26
Fixed in regex 2013-10-26.
Original comment by re...@mrabarnett.plus.com
on 25 Oct 2013 at 11:13
functools.lru_cache(from docs.python.org):
LRU (least recently used) cache works best when the most recent calls are the
best predictors of upcoming calls (for example, the most popular articles on a
news server tend to change each day). The cache’s size limit assures that the
cache does not grow without bound on long-running processes such as web servers.
it dose not clear all entities.
cache flush keeps least recently used entities instead of random.sample.
Original comment by Lyricconch
on 1 Nov 2013 at 12:18
Original issue reported on code.google.com by
sha...@glossi.com
on 25 Oct 2013 at 1:07Attachments: