ZF-7691: Zend_Cache clean() does not work
Description
I'm trying to remove a cache with a specific tag. the clean()-method returns true, but the cache file gets not deleted or cleared.
How I save the cache: Someone is looking at a database record over a controller, i'm generating a individualy cache-id with some params. I start a new cache block and call it with $cache->end(array('tag', 'tag2'); When I'm going to save the existing database record i want to delete the cache. So I build up a new instance of the cache object in my model, and search for matching cache-ids.
my code looks like this:
$cacheIds = $cache->getIdsMatchingTags(array($this->getId()));
foreach ($cacheIds as $cacheId) {
$cache->remove($cacheId);
}
I don't know what to do else? I think that is a problem with Zend_Cache, r/w permissions are set cause i can write the cache on the given path.
Comments
Posted by Satoru Yoshida (satoruyoshida) on 2009-08-26T03:57:57.000+0000
Can you specify your Backend type and options? i.e. Xcache, Memcache , File etc.
Posted by Eduard Zintz (ezintz) on 2009-08-26T04:23:06.000+0000
Output186400blocks_1File/var/cache/technikboerse/blocks2
$config = Zend_Registry::get('config')->cache; $cache = Zend_Cache::factory( $config->frontend, $config->backend, $config->frontendOptions->toArray(), $config->backendOptions->toArray());
Posted by Satoru Yoshida (satoruyoshida) on 2009-08-27T07:22:28.000+0000
I think this issue may be similar to ZF-5740.
I suggest the following code:
should be:
or
Posted by Satoru Yoshida (satoruyoshida) on 2009-08-28T02:46:42.000+0000
Solved in SVN r17867