城市查询列表

轮播图
首页图标
This commit is contained in:
2025-12-22 21:26:10 +08:00
parent 7cb0becde5
commit f6d50d8d98
7 changed files with 106 additions and 26 deletions

View File

@@ -1,29 +1,49 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------
// | 缓存设置
// +----------------------------------------------------------------------
use think\facade\Env;
return [
// 驱动方式
'type' => Env::get('cache.type','File'),
// 缓存保存目录
'path' => '',
// 缓存前缀
'prefix' => 'like_shop_',
// 缓存有效期 0表示永久缓存
'expire' => 0,
'port' =>Env::get('cache.port','6379'),
// 缓存配置为文件类型
'type' => 'complex',
'host' => Env::get('cache.host','like-redis'),
// 默认缓存配置
'default' => [
// 驱动方式
'type' => 'File',
// 缓存保存目录
'path' => '',
// 缓存前缀
'prefix' => 'like_shop_',
// 缓存有效期 0表示永久缓存
'expire' => 0,
],
// Redis缓存配置
'redis' => [
// 驱动方式
'type' => 'redis',
// Redis服务器地址
'host' => Env::get('cache.host','127.0.0.1'),
// Redis服务器端口
'port' => Env::get('cache.port','6379'),
// Redis连接密码留空表示无密码
'password' => Env::get('cache.pwd',''),
// Redis数据库索引0-15默认为0
'select' => Env::get('cache.select', 0),
// 连接超时时间0表示不限制
'timeout' => Env::get('cache.timeout', 0),
// 是否使用长连接true=长连接false=短连接)
'persistent' => Env::get('cache.persistent', true),
// 缓存前缀,用于区分不同应用或环境的缓存
'prefix' => 'like_shop_redis_',
// 缓存有效期0表示永久缓存
'expire' => Env::get('cache.expire', 0),
],
// File缓存配置
'file' => [
'type' => 'File',
'path' => '',
'prefix' => 'like_shop_file_',
'expire' => 0,
],
];