You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
875 B
22 lines
875 B
|
2 months ago
|
const cacheExports = {
|
||
|
|
unstable_cache: require('next/dist/server/web/spec-extension/unstable-cache')
|
||
|
|
.unstable_cache,
|
||
|
|
revalidateTag: require('next/dist/server/web/spec-extension/revalidate')
|
||
|
|
.revalidateTag,
|
||
|
|
revalidatePath: require('next/dist/server/web/spec-extension/revalidate')
|
||
|
|
.revalidatePath,
|
||
|
|
unstable_noStore:
|
||
|
|
require('next/dist/server/web/spec-extension/unstable-no-store')
|
||
|
|
.unstable_noStore,
|
||
|
|
}
|
||
|
|
|
||
|
|
// https://nodejs.org/api/esm.html#commonjs-namespaces
|
||
|
|
// When importing CommonJS modules, the module.exports object is provided as the default export
|
||
|
|
module.exports = cacheExports
|
||
|
|
|
||
|
|
// make import { xxx } from 'next/cache' work
|
||
|
|
exports.unstable_cache = cacheExports.unstable_cache
|
||
|
|
exports.revalidatePath = cacheExports.revalidatePath
|
||
|
|
exports.revalidateTag = cacheExports.revalidateTag
|
||
|
|
exports.unstable_noStore = cacheExports.unstable_noStore
|