if (getFileHash() == '') {
// Create filename from hashed random string
$fileHash = sha1(generatePassword(mt_rand(128, 256)));
- $FQFN = sprintf("%sinc/cache/.%s",
+ $FQFN = sprintf("%sinc/cache/.%s.cache",
getPath(),
$fileHash
);
if (isFileReadable($FQFN)) {
// Also update configuration
setConfigEntry('secret_key', $secretKey);
+ updateConfiguration('file_hash', $fileHash);
// Remove variables
unset($secretKey);
} // END - if
} // END - if
+// @TODO Rewrite this to a filter
+if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isCacheInstanceValid())) {
+ // Destroy some cache files
+ if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->removeCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('extension')) $GLOBALS['cache_instance']->removeCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('modules')) $GLOBALS['cache_instance']->removeCacheFile();
+} // END - if
+
// [EOF]
?>