mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-11 00:22:49 +00:00
默认集成redis缓存,只需配置即可
This commit is contained in:
parent
56d86f647e
commit
d6b88dd107
@ -4,7 +4,7 @@
|
||||
"description": "",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@cool-midway/core": "^5.0.7",
|
||||
"@cool-midway/core": "^5.0.8",
|
||||
"@cool-midway/es": "^5.0.2",
|
||||
"@cool-midway/file": "^5.0.3",
|
||||
"@cool-midway/pay": "^5.0.0",
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { CoolConfig } from '@cool-midway/core';
|
||||
import { MODETYPE } from '@cool-midway/file';
|
||||
import { MidwayConfig } from '@midwayjs/core';
|
||||
// import * as redisStore from 'cache-manager-ioredis';
|
||||
import * as fsStore from 'cache-manager-fs-hash';
|
||||
|
||||
export default {
|
||||
// 修改成你自己独有的key
|
||||
@ -18,6 +20,24 @@ export default {
|
||||
'.html': 'ejs',
|
||||
},
|
||||
},
|
||||
// 本地缓存
|
||||
cache: {
|
||||
store: fsStore,
|
||||
options: {
|
||||
path: 'cache',
|
||||
ttl: -1,
|
||||
},
|
||||
},
|
||||
// redis缓存
|
||||
// cache: {
|
||||
// store: redisStore,
|
||||
// options: {
|
||||
// host: '127.0.0.1',
|
||||
// port: 6379,
|
||||
// password: '',
|
||||
// db: 1,
|
||||
// },
|
||||
// },
|
||||
// cool配置
|
||||
cool: {
|
||||
// 是否自动导入数据库
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user