@scayle/storefront-nuxt
Version:
Nuxt integration for the SCAYLE Commerce Engine and Storefront API
15 lines (14 loc) • 757 B
TypeScript
/**
* Purges the entire cache.
*
* This event handler purges all entries from the configured cache.
* It requires both `$rpcContext` and `$cache` to be present in the event context.
* If either is missing, it returns a 500 Internal Server Error.
* If the purge operation is successful, it returns a 200 OK with `{ success: true }`.
* If an error occurs during purging, it returns a 500 Internal Server Error with `{ success: false }`
* and logs the error using the logger provided by `$rpcContext`.
*
* @returns A promise that resolves to either an object indicating success or a `Response` object indicating an error.
*/
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
export default _default;