ZF-2246: Tagging of cache records broken in ZendPlatform Backend
When using ZendPlatform as the backend for Zend_Cache, the tagging of records is not working as expected. Each unique tag will reference the first record that was tagged with it, only. This seems due to the fact that output_cache_put() does not overwrite an existing record with the same key.
Preceding the call to output_cache_put() with a call to output_cache_remove_key() seems to solve the issue:
--- ../../live/inc/Zend/Cache/Backend/ZendPlatform.php Thu Jul 19 00:00:24 2007 +++ Zend/Cache/Backend/ZendPlatform.php Thu Nov 29 15:30:51 2007 @@ -148,6 +148,7 @@ $old_tags = array(); } $old_tags[$id] = $id; + output_cache_remove_key($tagid); $result2 = output_cache_put($tagid, $old_tags); }