mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-22 07:26:48 +00:00
缓存优化
This commit is contained in:
@@ -3,6 +3,7 @@ import getAllPageIds from './getAllPageIds'
|
||||
import getPageProperties from './getPageProperties'
|
||||
import { defaultMapImageUrl } from 'react-notion-x'
|
||||
import { getNotionPageData } from '@/lib/notion/getNotionData'
|
||||
import { delCacheData } from '@/lib/cache/cache_manager'
|
||||
|
||||
/**
|
||||
* 获取所有文章列表
|
||||
@@ -61,6 +62,8 @@ export async function getAllPosts ({ notionPageData, from, includePage = false }
|
||||
|
||||
if (!posts || posts.length === 0) {
|
||||
console.warn('文章列表为空')
|
||||
const cacheKey = 'page_block_' + BLOG.NOTION_PAGE_ID
|
||||
await delCacheData(cacheKey)
|
||||
}
|
||||
// Sort by date
|
||||
if (BLOG.POSTS_SORT_BY === 'date') {
|
||||
|
||||
Reference in New Issue
Block a user