For Zend_Cache_Frontend_Core you can define a lifetime and, according to the documentation, a "automatic_cleaning_factor".
According to the manual, this p开发者_如何学JAVAroperty specifies on how many writes to the cache old cache entries get invalid.
When I use APC as backend shouldn't the cache invalidate itself automatically without having to write to the cache?
Or did I misunderstand something there?
APC can do two things - cache php opcodes, and cache user (applicaton data). It will automatically purge stale opcode cache entries (by checking file modified times) but it has no way to automatically delete your cache entries.
You must specify entries to remove and manage this in your application.
精彩评论