incubator-bloodhound-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olemis Lang <ole...@gmail.com>
Subject Re: svn commit: r1453323 - in /incubator/bloodhound/branches/bep_0003_multiproduct: bloodhound_multiproduct/multiproduct/env.py bloodhound_multiproduct/multiproduct/hooks.py bloodhound_multiproduct/multiproduct/util.py bloodhound_theme/bhtheme/theme.py
Date Wed, 06 Mar 2013 19:54:02 GMT
On 3/6/13, jure@apache.org <jure@apache.org> 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.

Mime
View raw message