mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix code style / php 5.3 compat
This commit is contained in:
parent
dac3c5ee16
commit
05a519ecc5
18
cache/Cache.php
vendored
18
cache/Cache.php
vendored
@ -175,8 +175,8 @@ class SS_Cache {
|
|||||||
$backend = self::$backends[$backend_name];
|
$backend = self::$backends[$backend_name];
|
||||||
|
|
||||||
$basicOptions = array(
|
$basicOptions = array(
|
||||||
'cache_id_prefix' => md5(BASE_PATH) . '_' . $for . '_',
|
'cache_id_prefix' => md5(BASE_PATH) . '_' . $for . '_',
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($cache_lifetime >= 0) {
|
if ($cache_lifetime >= 0) {
|
||||||
$basicOptions['lifetime'] = $cache_lifetime;
|
$basicOptions['lifetime'] = $cache_lifetime;
|
||||||
@ -188,14 +188,14 @@ class SS_Cache {
|
|||||||
|
|
||||||
require_once 'Zend/Cache.php';
|
require_once 'Zend/Cache.php';
|
||||||
|
|
||||||
$cache = Zend_Cache::factory(
|
$cache = Zend_Cache::factory(
|
||||||
$frontend, $backend[0], $frontendOptions, $backend[1]
|
$frontend, $backend[0], $frontendOptions, $backend[1]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($frontendOptions['disable-segmentation']) && $frontendOptions['disable-segmentation']) {
|
if (!empty($frontendOptions['disable-segmentation'])) {
|
||||||
return $cache;
|
return $cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Injector::inst()->createWithArgs('CacheProxy', [$cache]);
|
return Injector::inst()->createWithArgs('CacheProxy', array($cache));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user