PHP APC:当APC缓存已满时会发生什么? [英] PHP APC: What happens when APC cache is full?

查看:62
本文介绍了PHP APC:当APC缓存已满时会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您尝试将变量添加到APC且APC缓存已满时会发生什么?它会自动从缓存中删除最少使用的变量吗?

What happens when you try to add a variable into APC and the APC cache is full? Does it automatically remove least used variable from the cache?

推荐答案

根据 APC:运行时配置,如果高速缓存用尽了可用内存,则如果ttl等于0,则该高速缓存将被完全清除.否则,如果ttl大于0 ,APC将尝试删除过期的条目."

According to APC: Runtime Configuration, "In the event of a cache running out of available memory, the cache will be completely expunged if ttl is equal to 0. Otherwise, if the ttl is greater than 0, APC will attempt to remove expired entries."

因此,如果TTL为非零值,它将删除生存时间已过的条目. ;)否则,它将删除整个缓存.

So if there is a non-zero TTL, it will remove entries whose time to live has passed. ;) Otherwise, it will remove the entire cache.

我注意到,这并不能真正解决如果缓存用完并且TTL过高的情况.

I notice this doesn't really address what happens if the cache runs out of memory and you have an excessively high TTL.

这篇关于PHP APC:当APC缓存已满时会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆