$GLOBALS['cache_array']['config'][$data['config']][$k] = $v;
} elseif ($this->name == 'filter') {
// Filter
- $GLOBALS['cache_array']['filter']['chains'][$data['filter_name']][$data['filter_function']] = $data['filter_active'];
+ $GLOBALS['cache_array']['filter']['chains'][$data['filter_name']][$data['filter_function']] = $data['filter_active'];
$GLOBALS['cache_array']['filter']['counter'][$data['filter_name']][$data['filter_function']] = $data['filter_counter'];
- $GLOBALS['cache_array']['filter']['loaded'][$data['filter_name']][$data['filter_function']] = TRUE;
+ $GLOBALS['cache_array']['filter']['loaded'][$data['filter_name']][$data['filter_function']] = TRUE;
} elseif ($this->name == 'modules') {
// Modules
$GLOBALS['cache_array']['modules'][$k][$data['module']] = $v;
// Remove cache
foreach (array('config', 'extension', 'filter', 'modules', 'earning', 'points_data') as $cache) {
- // Is this cache there?
- if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
- // Yes, then remove it
- $GLOBALS['cache_instance']->removeCacheFile();
- } // END - if
+ // Rebuild cache
+ rebuildCache($cache);
} // END - foreach
// Return it
} // END - if
// Remove cache
- if ($GLOBALS['cache_instance']->loadCacheFile('admin')) {
- $GLOBALS['cache_instance']->removeCacheFile();
- } // END - if
+ rebuildCache('admin');
// Return the data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
// Remove cache files
foreach (array('admin', 'admin_acls', 'config', 'extension', 'earning', 'filter', 'imprint', 'modules', 'payments', 'points_data', 'refdepths', 'refsystem', 'themes') as $cache) {
- // Is the cache file readable?
- // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
- if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
- // Remove the cache file
- $GLOBALS['cache_instance']->removeCacheFile();
- } // END - if
+ // Rebuild it
+ rebuildCache($cache);
} // END - foreach
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
// Shall I remove the cache file?
if ((isExtensionInstalled('cache')) && (isCacheInstanceValid()) && (isHtmlOutputMode())) {
// Rebuild cache only in HTML output-mode
+ // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
// Destroy it
$GLOBALS['cache_instance']->removeCacheFile($force);
// @TODO Rewrite this to a filter
if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isCacheInstanceValid())) {
// Destroy some cache files
- foreach (array('config', 'extension', 'filter', 'modules') as $cache) {
- // Is the cache file there?
- if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
- // Then remove it
- $GLOBALS['cache_instance']->removeCacheFile();
- } // END - if
+ foreach (array('config', 'extension', 'filter', 'modules') as $cache) {
+ // Use rebuildCache()
+ rebuildCache($cache);
} // END - foreach
} // END - if
if (isExtensionActive('cache')) {
// Remove cache file (will be auto-created again!)
foreach (array('config', 'extension', 'filter', 'modules') as $cache) {
- // Is the cache file there?
- if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
- // Remove cache file
- $GLOBALS['cache_instance']->removeCacheFile();
- } // END - if
+ // Rebuild cache file
+ rebuildCache($cache);
} // END - foreach
} // END - if
$module,
$what
), __FUNCTION__, __LINE__);
+
+ // Entry found?
if (SQL_NUMROWS($result) == 1) {
// Load action value and pray that this one is the right you want... ;-)
$data = SQL_FETCHARRAY($result);
continue;
} // END - if
- // Is the cache file loadable?
- if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
- // Then remove it
- $GLOBALS['cache_instance']->removeCacheFile();
- } // END - if
+ // Use rebuildCache() to delete it
+ rebuildCache($cache);
} // END - foreach
} // END - if