born05 / craft-cache-control
Installs: 71
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 5
Language:TypeScript
Type:craft-plugin
Requires
- php: >=8.0.2
- craftcms/cms: >=4.0.0
- dev-main
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- dev-dependabot/composer/twig/twig-3.14.2
- dev-dependabot/composer/twig/twig-3.14.1
- dev-dependabot/composer/symfony/http-client-6.4.14
- dev-dependabot/npm_and_yarn/npm/multi-ecccd59410
- dev-dependabot/npm_and_yarn/npm/rollup-4.22.4
- dev-dependabot/npm_and_yarn/npm/vite-5.4.6
This package is auto-updated.
Last update: 2024-11-12 19:45:40 UTC
README
A simple way to add control caching in your SvelteKit project.
Install:
npm i -D @born05/sveltekit-cache-control
Example usage:
import { sequence } from '@sveltejs/kit/hooks'; import type { Handle } from '@sveltejs/kit'; import { proxyHandle } from '@born05/sveltekit-cache-control'; const svelteHandle: Handle = async ({ event, resolve }) => { const response = await resolve(event); return response; }; export const handle = sequence( cacheControlHandle(env.REDIS_URL, { etagCacheKey: 'some-etag' }), svelteHandle, );