/** * @since 1.9 * * @param Cache|null $cache */ public function __construct(Cache $cache = null) { $this->cache = $cache; $this->cacheFactory = ApplicationFactory::getInstance()->getCacheFactory(); if ($this->cache === null) { $this->cache = $this->cacheFactory->newNullCache(); } }