This is just what I need. Works fine. Thanks.

(i just saw that i've post to -devel instead of -discuss, sorry)

2008/11/26 Michael Bayer <[EMAIL PROTECTED]>:
>
> use mycache.remove_value(key) to invalidate or remove a value from the
> cache.  expiretime is only honored when a new value is actually stored
> since expiretime is now stored within the cache itself.   it would be
> broken behavior for a cache write to occur on every call to get_value
> () where expiretime is present.  perhaps the logic can be such that
> the value is written if the expiretime is different that what was
> stored but im not sure if that just makes it more complicated.
>
> On Nov 26, 6:32 am, "Gael Pasgrimaud" <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I'm trying to invalidate a single key without invalidate the whole
>> cache. I use this code:
>>
>>     expiretime = not invalidate and 3600 or 0
>>     mycache = cache.get_cache('users_profils', type='memory')
>>     return mycache.get_value(key=usr_id, createfunc=get_profils,
>>                              expiretime=expiretime)
>>
>> This work with an older version of Beaker (used in Pylons 0.9.6).
>>
>> Is there a way to do this with latest version ?
>>
>> --
>> Gael
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to