On May 16, 2007, at 4:22 AM, Alexandre CONRAD wrote:
>
> Michael Bayer wrote:
>
>> has_key passes unit tests added in rev 70, using DBM files like your
>> example, im fairly certain this worked in older versions so you might
>> want to double check your cache expiry/etc. and/or upgrade to beaker
>> trunk; fixed/added support for unicode keys in rev 71.
>
> I've updated to the Beaker-0.7dev_r71-py2.4.egg. I had to change some
> import statments in "pylons/wsgiapp.py" because SessionMiddleware and
> CacheMiddleware were moved over in "beaker/middleware.py".
>
> I noticed that pylons "cache" object (beaker.cache.CacheManager)
> returns
> a different "beaker.cache.Cache" object everytime:
>
>>>> cache.get_cache("users")
> <beaker.cache.Cache object at 0x12543d0>
>>>> cache.get_cache("users")
> <beaker.cache.Cache object at 0x1244410>
>>>> cache.get_cache("users")
> <beaker.cache.Cache object at 0x1254490>
>>>> cache.get_cache("users")
> <beaker.cache.Cache object at 0x1254410>
>>>> cache.get_cache("users")
> <beaker.cache.Cache object at 0x1244410>
>>>> cache.get_cache("users")
> <beaker.cache.Cache object at 0x12543d0>
>>>> cache.get_cache("users")
> <beaker.cache.Cache object at 0x1254490>
>
> Actually, it seems to randomly return a previously returned object.
> It's
> pretty confusing. Doing a .get_value("anonymous") always returns the
> correct information, but the .has_key() method doesn't work.
>
CacheManager.get_cache() seems to return a new Cache every time.
those ids might just be recycled ids. it is also fairly wasteful and
i might ask Ben what ways we can look into holding onto a particlar
Cache longer within CacheManager.
anyway added tests for dual caches on the same arguments and there
was a bug in is_expired() so that is fixed in r82.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---