/** * @return CacheFile * @throws Exception */ public final function getPersistentBackend() { $backend = $this->settings->getCacheBackend(); if ($backend == 'file') { return new CacheFile($this->settings); } else { if ($backend == 'db') { return new CacheDb($this->settings); } } throw new Exception('No suitable caching backend found for type "' . $backend . '"'); }