ZendCacheを使用してキャッシュを実装しようとしています。次のコードを使用してキャッシュを初期化します。
$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));
次のコードを使用してキャッシュを開始します。
$id = bin2hex($_SERVER["REQUEST_URI"]);
$cache->start($id, array());
キャッシュファイルは生成されますが、次の方法を使用して削除できませんremove()
(キャッシュは更新されません)。
$cache->remove($id); // id generated like above from the REQUEST_URI of the page I want to refresh
私は何を間違っているのですか?ありがとう。