Files
dafuweng-saiadmin6.x/server/plugin/saiadmin/config/saithink.php
2026-03-03 18:55:03 +08:00

77 lines
2.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: sai <1430792918@qq.com>
// +----------------------------------------------------------------------
return [
'access_exp' => 8 * 60 * 60, // 登录token有效期默认8小时
// 验证码配置
'captcha' => [
// 是否启用登录验证码。改为 false 即关闭;也可用环境变量 LOGIN_CAPTCHA_ENABLE=0 关闭
'enable' => filter_var(getenv('LOGIN_CAPTCHA_ENABLE') ?: '0', FILTER_VALIDATE_BOOLEAN),
// 验证码存储模式 session 或 cache
'mode' => getenv('CAPTCHA_MODE'),
// 验证码过期时间 (秒)
'expire' => 300,
],
// excel模板下载路径
'template' => base_path(). '/plugin/saiadmin/public/template',
// excel导出文件路径
'export_path' => base_path() . '/plugin/saiadmin/public/export/',
// 文件开启hash验证开启后上传文件将会判断数据库中是否存在如果存在直接获取
'file_hash' => false,
// 用户信息缓存
'user_cache' => [
'prefix' => 'saiadmin:user_cache:info_',
'expire' => 60 * 60 * 4,
'dept' => 'saiadmin:user_cache:dept_',
'role' => 'saiadmin:user_cache:role_',
'post' => 'saiadmin:user_cache:post_',
],
// 用户权限缓存
'button_cache' => [
'prefix' => 'saiadmin:button_cache:user_',
'expire' => 60 * 60 * 2,
'all' => 'saiadmin:button_cache:all',
'role' => 'saiadmin:button_cache:role_',
'tag' => 'saiadmin:button_cache',
],
// 用户菜单缓存
'menu_cache' => [
'prefix' => 'saiadmin:menu_cache:user_',
'expire' => 60 * 60 * 24 * 7,
'tag' => 'saiadmin:menu_cache',
],
// 字典缓存
'dict_cache' => [
'expire' => 60 * 60 * 24 * 365,
'tag' => 'saiadmin:dict_cache',
],
// 配置数据缓存
'config_cache' => [
'expire' => 60 * 60 * 24 * 365,
'prefix' => 'saiadmin:config_cache:config_',
'tag' => 'saiadmin:config_cache'
],
// 反射缓存
'reflection_cache' => [
'tag' => 'saiadmin:reflection',
'expire' => 60 * 60 * 24 * 365,
'no_need' => 'saiadmin:reflection_cache:no_need_',
'attr' => 'saiadmin:reflection_cache:attr_',
],
];