Skip to content

Commit

Permalink
移除mongodb
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Apr 9, 2024
1 parent 43f03a4 commit 295d297
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1,080 deletions.
9 changes: 3 additions & 6 deletions lib/cache/cache_manager.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import MemoryCache from './memory_cache'
import FileCache from './local_file_cache'
import MongoCache from './mongo_db_cache'
import BLOG from '@/blog.config'
import FileCache from './local_file_cache'
import MemoryCache from './memory_cache'

/**
* 为减少频繁接口请求,notion数据将被缓存
Expand Down Expand Up @@ -39,9 +38,7 @@ export async function delCacheData(key) {
* @returns
*/
function getApi() {
if (process.env.MONGO_DB_URL && process.env.MONGO_DB_NAME) {
return MongoCache
} else if (process.env.ENABLE_FILE_CACHE) {
if (process.env.ENABLE_FILE_CACHE) {
return FileCache
} else {
return MemoryCache
Expand Down
49 changes: 0 additions & 49 deletions lib/cache/mongo_db_cache.js

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"localStorage": "^1.0.4",
"lodash.throttle": "^4.1.1",
"memory-cache": "^0.2.0",
"mongodb": "^4.6.0",
"next": "13.3.1",
"notion-client": "6.15.6",
"notion-utils": "6.15.6",
Expand Down
Loading

0 comments on commit 295d297

Please sign in to comment.