MediaWiki fundraising/REL1_35
LocalClusterPsr6Cache.php
Go to the documentation of this file.
1<?php
2
3use Addshore\Psr\Cache\MWBagOStuffAdapter\BagOStuffPsrCache;
4
13class LocalClusterPsr6Cache extends BagOStuffPsrCache {
14
18 protected static $mainCache = null;
19
20 public function __construct() {
21 if ( self::$mainCache === null ) {
22 self::$mainCache = ObjectCache::getLocalClusterInstance();
23 if ( self::$mainCache instanceof EmptyBagOStuff ) {
24 // FIXME: where does this go?
26 'ObjectCache::getLocalClusterInstance() returned EmptyBagOStuff, using HashBagOStuff'
27 );
28 self::$mainCache = new HashBagOStuff();
29 }
30 }
31 parent::__construct( self::$mainCache );
32 }
33}
wfLogWarning( $msg, $callerOffset=1, $level=E_USER_WARNING)
Send a warning as a PHP error and the debug log.
Class representing a cache/ephemeral data store.
Definition BagOStuff.php:71
A BagOStuff object with no objects in it.
Simple store for keeping values in an associative array for the current process.
A PSR-6 compatible wrapper to let SmashPig objects use Mediawiki's local cluster BagOStuff cache via ...