Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/309169

Change subject: Make $wgRevisionCacheExpiry default to one week
......................................................................

Make $wgRevisionCacheExpiry default to one week

If CACHE_DB is used, it will not use the cache however.

Change-Id: I23b455ef46f27c313bb9573f69723b1436b2d584
---
M includes/DefaultSettings.php
M includes/Revision.php
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/309169/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 3bf8381..03947f6 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -2123,7 +2123,7 @@
  *
  * Set to 0 to disable, or number of seconds before cache expiry.
  */
-$wgRevisionCacheExpiry = 0;
+$wgRevisionCacheExpiry = 86400 * 7;
 
 /** @} */ # end text storage }
 
diff --git a/includes/Revision.php b/includes/Revision.php
index bc760a3..80fe397 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -1594,6 +1594,11 @@
                return $processCache->getWithSetCallback( $key, function () use 
( $cache, $key ) {
                        global $wgRevisionCacheExpiry;
 
+                       if ( $cache->getQoS( $cache::ATTR_EMULATION ) <= 
$cache::QOS_EMULATION_SQL ) {
+                               // Do not cache RDBMs blobs in...the RDBMs store
+                               return $this->fetchText();
+                       }
+
                        return $cache->getWithSetCallback(
                                $key,
                                $wgRevisionCacheExpiry,

-- 
To view, visit https://gerrit.wikimedia.org/r/309169
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23b455ef46f27c313bb9573f69723b1436b2d584
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to