Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.0
-
Fix Version/s: 1.7.0
-
Component/s: Zend_Cache
-
Labels:None
Description
I need to clear the cache only for pages with updated data.
I have not found an opportunity of use tags in current version
Zend_Cache_Frontend_Page.
Therefore I have written this small patch.
— D:/httpd/library/Zend/Cache/Frontend/Page.php.ori Mon Jul 23 23:21:01 2007
+++ D:/httpd/library/Zend/Cache/Frontend/Page.php Wed Jul 25 21:56:55 2007
@@ -79,6 +79,8 @@
'make_id_with_session_variables' => true,
'make_id_with_files_variables' => true,
'make_id_with_cookie_variables' => true,
+ 'tags' => array(),
+ 'lifetime' => false,
'cache' => true
),
'regexps' => array()
@@ -238,7 +240,7 @@
*/
public function _flush($data)
Now you can set tags and lifetime for every regexp :
$frontendOptions = array(
'lifetime' => 3600,
'regexps' => array(
'^/$' => array('cache' => true, 'tags' => array('tagNews','tagIndex') ),
'^/news/' => array('cache' => true, 'tags' => array('tagNews') )
)
Later i can clear cached pages by tags :
$cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array('tagNews')) );
Assigning to
Fabien MARTY to initiate issue review.