mirror of
https://github.com/flextype/flextype.git
synced 2025-08-08 22:26:46 +02:00
feat(cache): Move to PhpFastCache #457
This commit is contained in:
@@ -123,7 +123,11 @@ flextype()->container()['cache'] = static function () {
|
||||
$config = [];
|
||||
|
||||
foreach (flextype('registry')->get('flextype.settings.cache.drivers.'. $driver_name) as $key => $value) {
|
||||
$config[Strings::camel($key)] = $value;
|
||||
if ($key == 'path' && in_array($driver_name, ['files', 'sqlite', 'leveldb'])) {
|
||||
$config['path'] = (!empty($value)) ? PATH['cache'] . $value : sys_get_temp_dir();
|
||||
} else {
|
||||
$config[Strings::camel($key)] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $config;
|
||||
|
@@ -164,14 +164,14 @@ cache:
|
||||
devfalse: {}
|
||||
devtrue: {}
|
||||
files:
|
||||
path: ''
|
||||
path: '/data'
|
||||
security_key: 'auto'
|
||||
htaccess: true
|
||||
secure_file_manipulation: false
|
||||
cache_file_extension: txt
|
||||
default_ttl: 900
|
||||
leveldb:
|
||||
path: ''
|
||||
path: '/data'
|
||||
security_key: 'auto'
|
||||
htaccess: true
|
||||
default_ttl: 900
|
||||
@@ -226,7 +226,7 @@ cache:
|
||||
prefix: 'riak'
|
||||
default_ttl: 900
|
||||
sqlite:
|
||||
path: ''
|
||||
path: '/data'
|
||||
security_key: auto
|
||||
htaccess: true
|
||||
default_ttl: 900
|
||||
|
Reference in New Issue
Block a user