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 order of @var parameter in PHP
[lhc/web/wiklou.git]
/
includes
/
AjaxResponse.php
diff --git
a/includes/AjaxResponse.php
b/includes/AjaxResponse.php
index
dfcf467
..
8f4ed40
100644
(file)
--- a/
includes/AjaxResponse.php
+++ b/
includes/AjaxResponse.php
@@
-282,7
+282,8
@@
class AjaxResponse {
return false;
}
return false;
}
- $mcvalue = ObjectCache::getMainWANInstance()->get( $mckey );
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+ $mcvalue = $cache->get( $mckey );
if ( $mcvalue ) {
# Check to see if the value has been invalidated
if ( $touched <= $mcvalue['timestamp'] ) {
if ( $mcvalue ) {
# Check to see if the value has been invalidated
if ( $touched <= $mcvalue['timestamp'] ) {
@@
-304,11
+305,13
@@
class AjaxResponse {
* @return bool
*/
function storeInMemcached( $mckey, $expiry = 86400 ) {
* @return bool
*/
function storeInMemcached( $mckey, $expiry = 86400 ) {
- ObjectCache::getMainWANInstance()->set( $mckey,
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+ $cache->set( $mckey,
[
'timestamp' => wfTimestampNow(),
'value' => $this->mText
[
'timestamp' => wfTimestampNow(),
'value' => $this->mText
- ], $expiry
+ ],
+ $expiry
);
return true;
);
return true;