* The 'editcontentmodel' permission is now granted to all logged-in users ('user').
instead of just administrators ('sysop'). Documentation for this feature is
available at <https://www.mediawiki.org/wiki/Help:ChangeContentModel>.
+* $wgRevisionCacheExpiry is now set to one week by default instead of being disabled.
=== New features in 1.28 ===
* User::isBot() method for checking if an account is a bot role account.
*
* Set to 0 to disable, or number of seconds before cache expiry.
*/
-$wgRevisionCacheExpiry = 0;
+$wgRevisionCacheExpiry = 86400 * 7;
/** @} */ # end text storage }
* @return string|bool The revision's text, or false on failure
*/
private function loadText() {
- // Caching may be beneficial for massive use of external storage
global $wgRevisionCacheExpiry;
- if ( !$wgRevisionCacheExpiry ) {
- return $this->fetchText();
- }
-
$cache = ObjectCache::getMainWANInstance();
+ if ( $cache->getQoS( $cache::ATTR_EMULATION ) <= $cache::QOS_EMULATION_SQL ) {
+ // Do not cache RDBMs blobs in...the RDBMs store
+ $ttl = $cache::TTL_UNCACHEABLE;
+ } else {
+ $ttl = $wgRevisionCacheExpiry ?: $cache::TTL_UNCACHEABLE;
+ }
// No negative caching; negative hits on text rows may be due to corrupted replica DBs
return $cache->getWithSetCallback(
- $key = $cache->makeKey( 'revisiontext', 'textid', $this->getTextId() ),
- $wgRevisionCacheExpiry,
+ $cache->makeKey( 'revisiontext', 'textid', $this->getTextId() ),
+ $ttl,
function () {
return $this->fetchText();
},