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/
https://github.com/stucchio/Python-LRU-cache

PS. ouch ! the later is GPL v3 ... :'(

-- 
Regards,

Olemis.

Reply via email to