]> git.mxchange.org Git - friendica.git/commitdiff
Only compare the HTML when we forcefully ignore the cache
authorMichael <heluecht@pirati.ca>
Fri, 6 Apr 2018 16:52:01 +0000 (16:52 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 6 Apr 2018 16:52:01 +0000 (16:52 +0000)
include/text.php

index 957145ca1847308a47dfdf877fb5d24958a24e24..ee8a213ff659bfa3aa238e740ac51138346d25b3 100644 (file)
@@ -1198,7 +1198,12 @@ function put_item_in_cache(&$item, $update = false)
                $item["rendered-hash"] = hash("md5", $item["body"]);
 
                // Force an update if the generated values differ from the existing ones
-               if (($rendered_hash != $item["rendered-hash"]) || ($rendered_html != $item["rendered-html"])) {
+               if ($rendered_hash != $item["rendered-hash"]) {
+                       $update = true;
+               }
+
+               // Only compare the HTML when we forcefully ignore the cache
+               if (Config::get("system", "ignore_cache") && ($rendered_html != $item["rendered-html"])) {
                        $update = true;
                }