I don't think a count can be cached that way, but since it just returns a number, it can be cached in the usual way instead:
count = cache.ram('count', lambda: db(query).count(), time_expire=60) Anthony On Thursday, February 9, 2012 12:42:02 PM UTC-5, Richard wrote: > > Is it just me ? > > db(query).count(cache=(cache.ram, 60)) > > Won't work... > > I get : > > TypeError: count() got an unexpected keyword argument 'cache' > > Richard >