mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6672 from andrewandante/FIX/apcu-cache-error
FIX/apcu cache errors
This commit is contained in:
commit
58f336928a
@ -63,17 +63,16 @@ class DefaultCacheFactory implements CacheFactory
|
||||
}
|
||||
|
||||
if ($phpFilesSupported) {
|
||||
$opcache = Injector::inst()->create(PhpFilesCache::class, false, [$namespace, $defaultLifetime, $directory]);
|
||||
$opcache = Injector::inst()->create(PhpFilesCache::class, $namespace, $defaultLifetime, $directory);
|
||||
return $opcache;
|
||||
}
|
||||
|
||||
$fs = Injector::inst()->create(FilesystemCache::class, false, [$namespace, $defaultLifetime, $directory]);
|
||||
$fs = Injector::inst()->create(FilesystemCache::class, $namespace, $defaultLifetime, $directory);
|
||||
if (!$apcuSupported) {
|
||||
return $fs;
|
||||
}
|
||||
$apcu = Injector::inst()->create(ApcuCache::class, $namespace, (int) $defaultLifetime / 5, $version);
|
||||
|
||||
$apcu = Injector::inst()->create(ApcuCache::class, false, [$namespace, (int) $defaultLifetime / 5, $version]);
|
||||
|
||||
return Injector::inst()->create(ChainCache::class, false, [[$apcu, $fs]]);
|
||||
return Injector::inst()->create(ChainCache::class, [$apcu, $fs]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user