简体   繁体   English

过期的Memcache项目会自动删除吗?

[英]Do expired memcache items autodelete?

I set an item in memcache at 00:54 this morning with an expiration time of 30 minutes. 我今天凌晨00:54在memcache中设置了一个项目,到期时间为30分钟。 When I came back to the office this morning, I called the same key from memcache and was surprised to retrieve it as it was meant to have expired. 当我今天早上回到办公室时,我从内存缓存中调用了相同的密钥,但由于它本来应该过期而感到惊讶。 Will the item only get removed if memcache runs out of memory? 仅当内存缓存不足时,该项目才会被删除吗? Or is it more likely that there is an error in my script? 还是更有可能我的脚本有错误?

I am using PHP and the memcache object. 我正在使用PHP和memcache对象。

内存快取的密钥一旦达到有效期限,对其进行检索将返回与尝试检索不存在的密钥相同的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM