views:

221

answers:

1

For Zend_Cache_Frontend_Core you can define a lifetime and, according to the documentation, a "automatic_cleaning_factor".

According to the manual, this property 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?

A: 

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.

David Caunt
Actually, docs to apc_store() at http://us.php.net/apc_store say it has $ttl parameter, which limits time for which he data item is held in the cache, and Zend_Cache uses it.
StasM
Good point Stas, you're right
David Caunt