From: Stricted Date: Tue, 24 Dec 2013 21:13:47 +0000 (+0100) Subject: add fallback to disk cache X-Git-Tag: 2.0.1~8^2~1^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e5df14d8bc921594472ed950d2deac25d4a1872c;p=GitHub%2FWoltLab%2FWCF.git add fallback to disk cache --- diff --git a/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php b/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php index b52a3b7ad9..446d0a1c9e 100644 --- a/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php +++ b/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php @@ -30,7 +30,12 @@ class CacheHandler extends SingletonFactory { // init cache source object try { $className = 'wcf\system\cache\source\\'.ucfirst(CACHE_SOURCE_TYPE).'CacheSource'; - $this->cacheSource = new $className(); + if (class_exists($className)) + $this->cacheSource = new $className(); + else { + // fallback to disk cache + $this->cacheSource = new DiskCacheSource(); + } } catch (SystemException $e) { if (CACHE_SOURCE_TYPE != 'disk') {