cacheBackend = $cacheBackend; $this->cacheEpoch = $cacheEpoch; $this->hookContainer = $hookContainer; $this->stats = $stats; $this->logger = $logger; } /** * Get a ParserCache instance by $name. * @param string $name * @return ParserCache */ public function getInstance( string $name ) : ParserCache { if ( !isset( $this->instanceCache[$name] ) ) { $this->logger->debug( "Creating ParserCache instance for {$name}" ); $this->instanceCache[$name] = new ParserCache( $this->cacheBackend, $this->cacheEpoch, $this->hookContainer, $this->stats, $name ); } return $this->instanceCache[$name]; } }