且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP APC:当APC缓存已满时会发生什么?

更新时间:2023-12-05 10:06:04

根据 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.