From 39be79c1b0d15e21e533237834939b17b71bbc31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 21 Nov 2024 02:55:28 +0100 Subject: [PATCH] SeenTime: Actually use an in-process cache It doesn't work if every call to cache() returns a different CachedBagOStuff :') I found this thanks to log warnings I saw locally: SQLBagOStuff.WARNING: Duplicate get(): "mediawiki:echo:seen:alert:time:1" fetched 2 times SQLBagOStuff.WARNING: Duplicate get(): "mediawiki:echo:seen:message:time:1" fetched 2 times Change-Id: I9a920de88275c1297942b064cc635d5c25424fd2 --- includes/SeenTime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/SeenTime.php b/includes/SeenTime.php index e95e3ce54..5f8ee1cc1 100644 --- a/includes/SeenTime.php +++ b/includes/SeenTime.php @@ -56,7 +56,7 @@ class SeenTime { 'Either $wgEchoSeenTimeCacheType or $wgMainStash must be set' ); } - return new CachedBagOStuff( $services->getObjectCacheFactory()->getInstance( $cacheConfig ) ); + $wrappedCache = new CachedBagOStuff( $services->getObjectCacheFactory()->getInstance( $cacheConfig ) ); } return $wrappedCache;