如何在不获取Memcached项的情况下延长它的生命周期?

发布于 2024-10-03 17:25:02 字数 112 浏览 0 评论 0原文

我可以在不实际获取 Memcached 项目的情况下延长其生命周期吗?

当然,我可以得到该物品,再次设置它并增加使用寿命。 但是,这样我必须首先将对象复制到脚本的内存中,从性能角度来看这并不好。

Can I extend a lifetime of a Memcached item without actually getting it?

Sure, I can get the item, set it again and increase a lifetime.
However, this way I'll have to copy the object to script's memory first, which is not good from the perfomance prospective.

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

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

发布评论

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

评论(1

苏璃陌 2024-10-10 17:25:02

听起来您可能只想根本不设置 TTL(使用 0)并让 LRU 逐出您不访问的内容。如果您根本不打算访问这些项目,那么您为什么要关心它们是否在那里?

It sounds like you probably just want to not set a TTL at all (use 0) and let the LRU evict things that you aren't accessing. If you don't intend to access the items at all, then why do you care if they're there?

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