Hi Doug, A quick look through the beaker docs yielded this: http://beaker.groovie.org/caching.html#id3
Hope that helps! Brian On 5/14/10, writes_on <[email protected]> wrote: > > Hi all, > > Thanks to some help from Brian, I'm using the @beaker_cache decorator from: > > from pylons.decorators.cache import beaker_cache > > in my pylons application. This is working well to cache some large SA query > objects and expire them after awhile. This brings me to my next question: > how do manually expire/reset a cached item that's been saved using this > syntax? For instance, suppose I have some code that looks like this: > > @beaker_cache(expire=300, type='memory', cache_response=False) > def _expensiveQuery(self, id): > return self.model.expensive.query(id) > > Which will cache the results of the query for 5 minutes in memory. And let's > say some other controller action updates the tables that affect > _expensiveQuery(). How do I clear the cache results for this object so the > next time this controller action is called the _expensiveQuery() will re-run > the actual query and get the new table values rather than return the cached > copy? > > Thanks! > Doug > > -- > View this message in context: > http://pylons-discuss.1595796.n2.nabble.com/beaker-cache-how-to-clear-a-cached-element-tp5051429p5051429.html > Sent from the pylons-discuss mailing list archive at Nabble.com. > > -- > 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. > > -- Sent from my mobile device Brian O'Connor -- 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.
