APC:操作码缓存与用户缓存 - 设置单独的限制
我正在尝试从 APC(用于操作码)和 Memcache(用于我的用户数据)的典型组合转向纯粹基于 apc 的缓存。考虑到我的使用结构,这是有意义的并且性能更高。
但与以前不同的是,apc 缓存被限制在合理的大小并且不会影响我的数据缓存,我现在担心操作码缓存可能会变得相对较大,从而导致操作码缓存和数据缓存的总和超过限制。据我了解,这将导致总缓存的刷新。
有没有办法模仿这种行为,就好像 apc 只是一个操作码缓存,并将操作码缓存大小限制在合理的范围内,剩下的留给用户数据?
或者我应该尝试为操作码缓存设置较低的 ttl 值,以便它总是首先被刷新?
I am trying to move from the typical combination of APC (for opcode) and Memcache (for my userdata) to a purely apc based cache. Given my usage structure it makes sense and performance is higher.
But unlike before, where the apc cache was limited to a reasonable size and did not affect my data cache, I am now worried that the opcode cache might grow relatively large so that the sum of opcode cache an datacache exceeds the limit. As far as I understand, this would result in a flush of the total cache.
Is there a way to mimic the behaviour, as if apc was only an opcode cache and limit the opcode cache size to a reasonable limit, leaving the rest for user data?
Or should I try setting lower ttl values for the opcode cache, so it always gets flushed first?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,我的问题无关紧要。由于缓存碎片问题,缓存很快就会被标记为已满。 (请参阅 stackoverflow 上的其他帖子)。因此 apc 用户缓存只能有选择地使用。
It turned out, that my question is irrelevant. Due to the cache fragmentation problems, the cache is quickly marked as full. (see other posts on stackoverflow). As a consequence apc user cache should only be used selectively.