Beaker 缓存性能指南

发布于 2024-10-28 11:15:44 字数 223 浏览 11 评论 0原文

我使用cherrypy应用程序实现了beaker,但是在一些请求之后,烧杯响应时间增加了大约10-14秒。

我认为在缓存中包含 500 到 1000 个项目后,烧杯会下降。

所有缓存类型都很简单(str,int,list,tuple,...)

I was implemented beaker with a cherrypy application, but after some requests, the beaker response time increases about 10-14 seconds.

i think after including 500 to 1000 items in cache, beaker goes down.

all cached types are simple(str,int,list,tuple,...)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

三月梨花 2024-11-04 11:15:44

我发现问题了,
烧杯在文件类型后端方面存在一些性能问题。
我只是将其更改

'cache.type' : 'file'

为:

'cache.type' : 'dbm'

一切都那么好!

当类型为file时,beaker使用python纯pickle库来序列化对象。而且泡菜不适合大物体。

I Found the problem,
The beaker have some performance problems with file type back-end.
simply i changed the

'cache.type' : 'file'

to:

'cache.type' : 'dbm'

and everything is so good!!!

when type is file beaker uses python pure pickle library to serialize the object. and pickle does not good for large objects.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文