aboutsummaryrefslogtreecommitdiffstats
path: root/includes/FeedUtils.php
diff options
context:
space:
mode:
authorAaron Schulz <aschulz@wikimedia.org>2015-11-09 22:48:36 -0800
committerAaron Schulz <aschulz@wikimedia.org>2015-11-10 11:11:05 -0800
commit3517be1cf0b7841b6f20d97fbcfa97f8645270a6 (patch)
tree455b0a59e169a4e5d1bb2a3693f6f24fdbddd276 /includes/FeedUtils.php
parentda4a378e74f2e3636b4f1132e4732ec3c2637eb9 (diff)
downloadmediawikicore-3517be1cf0b7841b6f20d97fbcfa97f8645270a6.tar.gz
mediawikicore-3517be1cf0b7841b6f20d97fbcfa97f8645270a6.zip
Migrate feeds from $messageMemc to the WAN cache
This makes the delete() calls work properly for all DCs. Also, using the message cache was fairly bizzare. Change-Id: Idec7fa47811e982ba89bb8fbbd9565a26585e77f
Diffstat (limited to 'includes/FeedUtils.php')
-rw-r--r--includes/FeedUtils.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php
index 57ba4b3e083b..b058975b736f 100644
--- a/includes/FeedUtils.php
+++ b/includes/FeedUtils.php
@@ -30,18 +30,19 @@ class FeedUtils {
/**
* Check whether feed's cache should be cleared; for changes feeds
- * If the feed should be purged; $timekey and $key will be removed from
- * $messageMemc
+ * If the feed should be purged; $timekey and $key will be removed from cache
*
* @param string $timekey Cache key of the timestamp of the last item
* @param string $key Cache key of feed's content
*/
public static function checkPurge( $timekey, $key ) {
- global $wgRequest, $wgUser, $messageMemc;
+ global $wgRequest, $wgUser;
+
$purge = $wgRequest->getVal( 'action' ) === 'purge';
if ( $purge && $wgUser->isAllowed( 'purge' ) ) {
- $messageMemc->delete( $timekey );
- $messageMemc->delete( $key );
+ $cache = ObjectCache::getMainWANInstance();
+ $cache->delete( $timekey, 1 );
+ $cache->delete( $key, 1 );
}
}