UNPKG

nuxt-multi-cache

Version:

SSR route, component and data cache for Nuxt.js

13 lines (12 loc) 637 B
import type { H3Event } from 'h3'; import type { NuxtMultiCacheCDNHelper } from './../helpers/CDNHelper.js'; /** * Return the helper to be used for interacting with the CDN headers feature. * * The helper is provided via a callback, which is only called server side. * That way the entire code patch, incl. calling useCDNHeaders, is removed * from client bundles. * * @param providedEvent Must be provided if not in a Vue context (page, component). This is the case when using this inside defineEventHandler. */ export declare function useCDNHeaders(cb: (helper: NuxtMultiCacheCDNHelper) => void, providedEvent?: H3Event): void;