[geeklog-hg] geeklog: Delete cache files for articles and blocks on any topic...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Oct 26 10:10:21 EDT 2013


changeset 9325:eac3cd7a4842
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/eac3cd7a4842
user: Tom <websitemaster at cogeco.net>
date: Sat Oct 26 10:09:53 2013 -0400
description:
Delete cache files for articles and blocks on any topic change since these objects could display information about their topic that could have been updated

diffstat:

 system/lib-template.php |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (32 lines):

diff -r 2569bda91fdd -r eac3cd7a4842 system/lib-template.php
--- a/system/lib-template.php	Thu Oct 24 21:13:03 2013 -0400
+++ b/system/lib-template.php	Sat Oct 26 10:09:53 2013 -0400
@@ -228,6 +228,7 @@
     // Also delete article cache on article save and delete
 
     $article = false;
+    $block = false;
     $whatsnew = false;
     $olderstories = false;
     $topicsblock = false;
@@ -241,6 +242,9 @@
     } elseif ($type == 'topic') {
         $topicsblock = true;
         $topic_tree = true;
+        // These items use topics and may display info about topics
+        $article = true;
+        $block = true;
     } else {
         // hack to see if plugin supports what's new
         $fn_head = 'plugin_whatsnewsupported_' . $type; 
@@ -255,6 +259,10 @@
         $cacheInstance = 'article__' . $id; // remove all article instances
         CACHE_remove_instance($cacheInstance);
     }
+    if ($block) {
+        $cacheInstance = 'block__' . $id; // remove all block instances
+        CACHE_remove_instance($cacheInstance);
+    }    
     if ($whatsnew) {
         $cacheInstance = 'whatsnew__'; // remove all whatsnew instances
         CACHE_remove_instance($cacheInstance);  



More information about the geeklog-cvs mailing list