SvelteKit Cloudflare Workers Caching Demo
This demo showcases three different caching strategies using SvelteKit with Cloudflare Workers. Each demo demonstrates a unique approach to caching and includes interactive examples.
Basic Cache API
Demonstrates how to use Cloudflare's Cache API to store and retrieve responses. This is the simplest form of caching, perfect for GET requests with static responses.
Try Basic Cache DemoPOST Request Caching
Shows how to cache POST requests by creating a unique cache key from the request body. This technique allows you to cache responses even for non-idempotent requests.
Try POST Cache DemoCustom Cache Control
Demonstrates advanced caching techniques using Cloudflare-specific fetch options. Learn how to control cache TTL, bypass cache, and use custom cache keys.
Try Custom Cache Demo