Brian,

Again, thanks for your help, spot on! That section of the documentation will
help me a lot. From the looks of it it might be useful in my case to create
some kind of a class that wraps up the decorator and invalidation mechanism
in one place. The way I'd like to use the cache is something like the
following:

1)    Make expensive SA query and cache it for 5 minutes (or so) so that all
users get the same data from the cache rather than running the query again.
2)    If the user takes an action on a web application that I know should
invalidate the contents of the cache, include in the action the invalidation
of the cached item so the next time a user calls for the cached data, the
query is run again.

Since items (1) and (2) above will be separate in the application I'll need
to maintains "state" somehow to identify the cached item to invalidate out
of context of the cache creation. 

I'll have to think about how to put together the things I'm using and what
you've shown me above to do something like this.

Thanks!
Doug 
-- 
View this message in context: 
http://pylons-discuss.1595796.n2.nabble.com/beaker-cache-how-to-clear-a-cached-element-tp5051429p5069941.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.

Reply via email to