I'm using beaker caching for several db heavy steps in my controllers,
which I invalidate when updates are made.  Something like this:

def get_stuff(id):
    @cache.region('longterm', 'get_stuff')
    def get(id):
        return BigComplexDatabaseThing(id)
    return customize_for_request(get(id))

def invalidate_stuff(id):
    cache.region_invalidate('%s.get' % get_stuff.__module__,
                            'longterm', 'get_stuff', id)

It works, but I'm worried that the voodoo used for the cache key may
change in some future version.  Is there a better way of getting the
correct key?

-- 
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