On 3/6/13, Olemis Lang <[email protected]> wrote: > On 3/6/13, [email protected] <[email protected]> wrote: >> Author: jure >> Date: Wed Mar 6 13:21:15 2013 >> New Revision: 1453323 >> >> URL: http://svn.apache.org/r1453323 >> Log: >> Product environment factory + simple LRU cache >> > [...] >> >> +import collections >> > [...] >> >> +def lru_cache(maxsize=100): >> + """Simple LRU cache decorator, using `collections.OrderedDict` for >> + item store >> + """ >> + def wrap(f): >> + cache = collections.OrderedDict() > [...] > > This won't work with Python 2.6 > :'( > > I suggest to use one of these , which seems to work on BH supported Py > versions > > http://code.activestate.com/recipes/498245-lru-and-lfu-cache-decorators/ [...]
In the meantime I'll be working with this patch https://issues.apache.org/bloodhound/attachment/ticket/390/t390_r1453384_lru_cache_py26.diff -- Regards, Olemis.
