mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
增加request_cache_expire配置参数用于配置全局的请求缓存有效期
This commit is contained in:
@@ -105,6 +105,8 @@ return [
|
|||||||
'var_pjax' => '_pjax',
|
'var_pjax' => '_pjax',
|
||||||
// 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
|
// 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
|
||||||
'request_cache' => false,
|
'request_cache' => false,
|
||||||
|
// 请求缓存有效期
|
||||||
|
'request_cache_expire' => null,
|
||||||
|
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | 模板设置
|
// | 模板设置
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ class App
|
|||||||
// 监听app_begin
|
// 监听app_begin
|
||||||
Hook::listen('app_begin', $dispatch);
|
Hook::listen('app_begin', $dispatch);
|
||||||
// 请求缓存检查
|
// 请求缓存检查
|
||||||
$request->cache($config['request_cache']);
|
$request->cache($config['request_cache'], $config['request_cache_expire']);
|
||||||
|
|
||||||
switch ($dispatch['type']) {
|
switch ($dispatch['type']) {
|
||||||
case 'redirect':
|
case 'redirect':
|
||||||
|
|||||||
Reference in New Issue
Block a user