Beaker@beaker_cache 缓存在 Pylons 中的位置
我已经在 pylons-discuss 上问过这个问题,但没有得到答案。
我找不到 @beaker_cache 装饰器的缓存存储在哪里。我认为它应该在数据目录中,但事实并非如此。它也不在/tmp 中。我尝试设置 beaker.cache.data_dir = %(here)s/data/cache 并手动创建目录,但它仍然不存在(目录始终为空)。
不过,缓存是有效的。如果我第二次刷新页面,我看不到任何数据库查询。那么它存储在哪里呢?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您使用装饰器的方式,它可能会将数据存储在内存中。
type
可以是“文件”、“内存”或“数据库”。默认是内存。Depending on how you are using the decorator, it could be storing the data in memory.
type
can be 'file', 'memory', or 'database'. The default is memory.