mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 15:09:47 +00:00
feat: bug fixes and update core deps
This commit is contained in:
@@ -8,7 +8,9 @@ import { getCanonicalPageId } from './get-canonical-page-id'
|
||||
|
||||
const uuid = !!includeNotionIdInUrls
|
||||
|
||||
export const getAllPages = pMemoize(getAllPagesImpl, { maxAge: 60000 * 5 })
|
||||
export const getAllPages = pMemoize(getAllPagesImpl, {
|
||||
cacheKey: (...args) => JSON.stringify(args)
|
||||
})
|
||||
|
||||
export async function getAllPagesImpl(
|
||||
rootNotionPageId: string,
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
// import ky from 'ky'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import pMemoize from 'p-memoize'
|
||||
import ExpiryMap from 'expiry-map'
|
||||
|
||||
import { api } from './config'
|
||||
import * as types from './types'
|
||||
|
||||
export const searchNotion = pMemoize(searchNotionImpl, { maxAge: 10000 })
|
||||
export const searchNotion = pMemoize(searchNotionImpl, {
|
||||
cacheKey: (args) => args[0]?.query,
|
||||
cache: new ExpiryMap(10000)
|
||||
})
|
||||
|
||||
async function searchNotionImpl(
|
||||
params: types.SearchParams
|
||||
|
||||
Reference in New Issue
Block a user