born05 / craft-cache-control
Installs: 179
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 8
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/craftcms/cms-5.5.2
- dev-dependabot/npm_and_yarn/js/nanoid-3.3.8
- dev-dependabot/npm_and_yarn/js/sveltejs/kit-2.8.3
- dev-dependabot/composer/symfony/http-client-6.4.15
- dev-dependabot/composer/twig/twig-3.14.2
- 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-12-18 19:49:01 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, );