diff --git a/lib/cache/cache_manager.js b/lib/cache/cache_manager.js index ec921177..2943b233 100644 --- a/lib/cache/cache_manager.js +++ b/lib/cache/cache_manager.js @@ -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