From: Roland Häder <roland@mxchange.org>
Date: Fri, 19 Oct 2012 15:01:56 +0000 (+0000)
Subject: If rebuildCache() is being called e.g. in view.php ('raw mode') then no cache is... 
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b4488a95f111cf4ca48eb33437e767053426f711;p=mailer.git

If rebuildCache() is being called e.g. in view.php ('raw mode') then no cache is being rebuilt as this caused concurrency problems
---

diff --git a/inc/functions.php b/inc/functions.php
index 321eddfaf5..7702331fc7 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -1423,8 +1423,8 @@ function rebuildCache ($cache, $inc = '', $force = FALSE) {
 	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("cache=%s, inc=%s, force=%s", $cache, $inc, intval($force)));
 
 	// Shall I remove the cache file?
-	if ((isExtensionInstalled('cache')) && (isCacheInstanceValid())) {
-		// Rebuild cache
+	if ((isExtensionInstalled('cache')) && (isCacheInstanceValid()) && (isHtmlOutputMode())) {
+		// Rebuild cache only in HTML output-mode
 		if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
 			// Destroy it
 			$GLOBALS['cache_instance']->removeCacheFile($force);