mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-14 04:00:57 +03:00
Fixed build when memcached is not enabled in PHP 7.1
This commit is contained in:
parent
3140ab2ad7
commit
5913550eec
1 changed files with 4 additions and 0 deletions
|
@ -59,6 +59,10 @@ class CacheFactory implements FactoryInterface
|
|||
case Cache\PhpFileCache::class:
|
||||
return new $cacheConfig['adapter']($cacheConfig['options']['dir']);
|
||||
case Cache\MemcachedCache::class:
|
||||
if (! class_exists(\Memcached::class)) {
|
||||
return new Cache\ArrayCache();
|
||||
}
|
||||
|
||||
$memcached = new \Memcached();
|
||||
$servers = isset($cacheConfig['options']['servers']) ? $cacheConfig['options']['servers'] : [];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue