nuxt-multi-cache
Version:
SSR route, component and data cache for Nuxt.js
14 lines (13 loc) • 597 B
TypeScript
import type { H3Event } from 'h3';
import { NuxtMultiCacheRouteCacheHelper } from './../helpers/RouteCacheHelper.js';
/**
* Get the helper to be used for interacting with the route cache.
*
* The helper provides ways to set the cacheability, cache tags, max age for
* the current route.
*
* The helper is provided via a callback, which is only called server side.
* That way the entire code patch, incl. calling useRouteCache, is removed
* from client bundles.
*/
export declare function useRouteCache(cb: (helper: NuxtMultiCacheRouteCacheHelper) => void, providedEvent?: H3Event): void;