V2.0 重新排班

This commit is contained in:
tangly1024
2021-12-17 13:49:17 +08:00
parent 67c0959485
commit 9c38dae8aa
28 changed files with 215 additions and 77 deletions

View File

@@ -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
}