I've already asked this on pylons-discuss but got no answers.
I can't find where the cache of the @beaker_cache decorat开发者_开发问答or is stored. I thought it should be in the data directory but it's not. It's also not in /tmp. I tried setting beaker.cache.data_dir = %(here)s/data/cache and creating the directory manually but it's still not there (the dir is always empty).
However, the cache works. If I refresh the page the second time I see no database queries. Where is it stored then?
Depending on how you are using the decorator, it could be storing the data in memory.
@cache.cache('mycache', type="file", expire=15)
def my_action(self):
stuff
type
can be 'file', 'memory', or 'database'. The default is memory.
精彩评论