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