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
This commit is contained in:
Bartosz Dziewoński 2024-11-21 02:55:28 +01:00
parent 0a50bd16cd
commit 39be79c1b0

View file

@ -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;