mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-15 23:16:48 +00:00
V2.0 重新排班
This commit is contained in:
6
lib/cache/memory_cache.js
vendored
6
lib/cache/memory_cache.js
vendored
@@ -1,9 +1,9 @@
|
||||
import cache from 'memory-cache'
|
||||
|
||||
export async function getCacheFromMemory (key, options) { // url为缓存标识
|
||||
export async function getCacheFromMemory (key, options) {
|
||||
return cache.get(key)
|
||||
}
|
||||
|
||||
export async function setCacheToMemory (key, data) { // url为缓存标识
|
||||
await cache.put(key, data, 5 * 60 * 1000)
|
||||
export async function setCacheToMemory (key, data) {
|
||||
await cache.put(key, data, 30 * 60 * 1000) // 30 minutes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user