dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix doc typo for wasConnectionError()
[lhc/web/wiklou.git]
/
includes
/
Revision.php
diff --git
a/includes/Revision.php
b/includes/Revision.php
index
0f8d0bd
..
6acc528
100644
(file)
--- a/
includes/Revision.php
+++ b/
includes/Revision.php
@@
-1577,19
+1577,20
@@
class Revision implements IDBAccessObject {
* @return string|bool The revision's text, or false on failure
*/
private function loadText() {
* @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;
global $wgRevisionCacheExpiry;
- if ( !$wgRevisionCacheExpiry ) {
- return $this->fetchText();
- }
-
$cache = ObjectCache::getMainWANInstance();
$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(
// 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();
},
function () {
return $this->fetchText();
},