I'm trying to implement a cache using Zend Cache. I use the following code to initialize the caches.
$tagCache = Zend_Cache::factory('Core',
'File',
array('automatic_serialization' => true),
array('cache_dir' => $cfg['instdir']. 'Cache_dir'));
$cache = Zend_Cache::factory('Capture',
'Static',
array(),
array('index_filename' => 'index',
'public_dir' => $cfg['instdir'] . 'Cached',
'tag_cache' => $tagCache));
I use the following code to start caching:
$id = bin2hex($_SERVER["REQUEST_URI"]);
$cache->start($id, array());
The cache files are generated but I can't delete them using the remove()
method (the cache doesn't refresh):
$cache->remove($id); // id generated like above from the REQUEST_URI of the page I want to refresh
What am I doing wrong ? Thanks.