Question

I've already asked this on pylons-discuss but got no answers.

I can't find where the cache of the @beaker_cache decorator 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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top