// @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