unset($masterSalt);
} // END - if
-if (getFileHash() == '') {
+if ((getFileHash() == '') || (!isFileReadable(getPath() . getCachePath() . '.' . getFileHash() . '.cache'))) {
// Create filename from hashed random string
$fileHash = sha1(generatePassword(mt_rand(128, 256)));
- $FQFN = sprintf("%s%s.%s.cache",
+ $FQFN = sprintf('%s%s.%s.cache',
getPath(),
getCachePath(),
$fileHash
if (isFileReadable($FQFN)) {
// Also update configuration
setConfigEntry('secret_key', $secretKey);
- updateConfiguration('file_hash', $fileHash);
+
+ // Force update
+ updateConfiguration('file_hash', $fileHash, '', '0', TRUE);
// Remove variables
unset($secretKey);
} // END - if
// @TODO Rewrite this to a filter
-if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isCacheInstanceValid())) {
+if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isValidCacheInstance())) {
// Destroy some cache files
foreach (array('config', 'extension', 'filter', 'modules') as $cache) {
// Use rebuildCache()