This commit is contained in:
tangly1024
2021-09-27 09:33:21 +08:00
parent 22ca7f6d63
commit dfc0f645d4
76 changed files with 3650 additions and 2 deletions

9
lib/cache/memory_cache.js vendored Normal file
View 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)
}