[geeklog-hg] geeklog: If config options change for Topics Block cache files g...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Thu Jul 4 15:19:46 EDT 2013
changeset 9165:dc9a49a5d620
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/dc9a49a5d620
user: Tom <websitemaster at cogeco.net>
date: Thu Jul 04 15:12:47 2013 -0400
description:
If config options change for Topics Block cache files get deleted.
diffstat:
system/lib-template.php | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diffs (45 lines):
diff -r 28c31ef7d691 -r dc9a49a5d620 system/lib-template.php
--- a/system/lib-template.php Thu Jul 04 14:52:11 2013 -0400
+++ b/system/lib-template.php Thu Jul 04 15:12:47 2013 -0400
@@ -126,22 +126,29 @@
{
global $_TABLES, $_CONF;
- // If template comments disabled or enabled clear all cached templates
- // To be safe clear cache on enabling and disabling of cache
if ($group == 'Core' AND (in_array('cache_templates', $changes) OR in_array('template_comments', $changes))) {
+ // If template comments disabled or enabled clear all cached templates
+ // To be safe clear cache on enabling and disabling of cache
CTL_clearCache();
- } elseif ($_CONF['whatsnew_cache_time'] > 0) {
+ } elseif ($group == 'Core' AND (in_array('sortmethod', $changes) OR
+ in_array('showstorycount', $changes) OR
+ in_array('showsubmissioncount', $changes) OR
+ in_array('hide_home_link', $changes))) {
+ // If Topics Block options changed then delete it's cache
+ $cacheInstance = 'topicsblock__';
+ CACHE_remove_instance($cacheInstance);
+ } elseif ($group == 'Core' AND (in_array('newstoriesinterval', $changes) OR
+ in_array('newcommentsinterval', $changes) OR
+ in_array('newtrackbackinterval', $changes) OR
+ in_array('hidenewstories', $changes) OR
+ in_array('hidenewcomments', $changes) OR
+ in_array('hidenewtrackbacks', $changes) OR
+ in_array('hidenewplugins', $changes) OR
+ in_array('title_trim_length', $changes) OR
+ in_array('whatsnew_cache_time', $changes))) {
// Probably not really necessary but clear cache if enabled on these other settings that can have cache files
// These are from the What's New Block
- if ($group == 'Core' AND (in_array('newstoriesinterval', $changes) OR
- in_array('newcommentsinterval', $changes) OR
- in_array('newtrackbackinterval', $changes) OR
- in_array('hidenewstories', $changes) OR
- in_array('hidenewcomments', $changes) OR
- in_array('hidenewtrackbacks', $changes) OR
- in_array('hidenewplugins', $changes) OR
- in_array('title_trim_length', $changes) OR
- in_array('whatsnew_cache_time', $changes))) {
+ if ($_CONF['whatsnew_cache_time'] > 0) {
$cacheInstance = 'whatsnew__'; // remove all whatsnew instances
CACHE_remove_instance($cacheInstance);
}
More information about the geeklog-cvs
mailing list