1
0
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:
Awilum
2020-09-02 00:17:50 +03:00
parent e09e2a4128
commit d78abbd723
2 changed files with 8 additions and 4 deletions

View File

@@ -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;

View File

@@ -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