Files
swiftadmin/config/thinkcache.php

24 lines
755 B
PHP
Raw Normal View History

2022-08-19 19:48:37 +08:00
<?php
return [
2023-04-25 20:11:49 +08:00
'default' => get_env('CACHE_DRIVER') ?: 'file',
2022-08-19 19:48:37 +08:00
'stores' => [
'file' => [
'type' => 'File',
// 缓存保存目录
'path' => runtime_path() . '/cache/',
// 缓存前缀
'prefix' => '',
// 缓存有效期 0表示永久缓存
'expire' => 0,
],
'redis' => [
'type' => 'redis',
2023-04-25 20:11:49 +08:00
'host' => get_env('CACHE_HOSTNAME') ?: '127.0.0.1',
'port' => get_env('CACHE_HOSTPORT') ?: 6379,
'select' => get_env('CACHE_SELECT') ?: 0,
'password' => get_env('CACHE_PASSWORD') ?: '',
2022-08-19 19:48:37 +08:00
'prefix' => 'redis_',
'expire' => 0,
],
],
];