mongo配置

This commit is contained in:
tlyong1992
2022-06-07 13:17:06 +08:00
parent a741007ddc
commit 3f2551285d

View File

@@ -2,10 +2,9 @@ import MemoryCache from './memory_cache'
import FileCache from './local_file_cache'
import MongoCache from './mongo_db_cache'
const enableCache = true
const enableMongoCache = true
let api
if (enableMongoCache) {
if (process.env.MONGO_DB_URL && process.env.MONGO_DB_NAME) {
api = MongoCache
} else if (process.env.ENABLE_FILE_CACHE) {
api = FileCache