缓存优化

This commit is contained in:
tangly1024
2022-01-27 13:58:49 +08:00
parent 44c698fd4d
commit 63e39fa2a8
6 changed files with 26 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ export async function getPostBlocks (id, from, slice) {
const cacheKey = 'page_block_' + id
let pageBlock = await getDataFromCache(cacheKey)
if (pageBlock) {
console.log('[请求缓存]:', `from:${from}`, `id:${id}`)
console.log('[请求缓存]:', `from:${from}`, `id:${id}`, cacheKey)
return filterPostBlocks(id, pageBlock, slice)
}
const authToken = BLOG.NOTION_ACCESS_TOKEN || null