Web2py has an elegant interface to using cache (ram/disk/memcache) but
is there a hole when it is applied to database actions?

When using database .select() statements one can specify the use of
caching using...
e.g., ... .select(cache=(cache.ram, 60 * 60 * 24)) # cache result for
a day

To flush a cache I can't find a clean/targeted solution.

I've read postings (mdipierro, 9mar2010):
... after insert/update/delete you do
db(...).select(cache=(cache.disk,0))

or:
cache.ram.clear(db._uri + '/SELECT')

The former flushes all the contents of the cache and the latter, using
the private variable _uri, restricts the flush to all database
selects.

Is there a better way extend Web2py's cache system to supporting
databases?

Can we get one more step of specificity? Namely, can we limit the
flush to a specific table or tables?

Reply via email to