Dev
CDN Config Prompt Generator
A CDN misconfigured to cache personalised API responses serves one user's data to another. One caching HTML indefinitely means a deploy does not reach users until the TTL expires. This tool generates a fill-in prompt that asks an AI assistant to configure your CDN with deliberate cache rules. Pick the provider — CloudFront, Cloudflare, Fastly, or Generic — and the content type: Static assets, Single-page app, Image delivery, or API responses. The prompt asks for the origin and default behaviour, Cache-Control and TTLs appropriate to the content type, a deliberate cache key defining which query strings, headers, and cookies matter, compression with HTTP/2 or HTTP/3, forced HTTPS with HSTS, and a cache invalidation strategy for deploys. Adapt the origin details and paste into your assistant.
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Pick your CDN provider.
- Choose the content type you are serving.
- Click Generate to build the prompt.
- Paste it into your AI assistant and adapt the origin details.
Use Cases
- •Getting a correct CDN configuration from an AI assistant
- •Choosing Cache-Control and TTLs for a content type
- •Defining a cache key that avoids serving wrong content
- •Setting up cache invalidation for deploys
- •Standardising CDN setup across providers
Tips
- →Cache hashed static assets aggressively, HTML briefly.
- →Be deliberate about which cookies and query strings enter the cache key.
- →Always force HTTPS and add HSTS at the edge.
- →Have an invalidation plan before you turn caching up.
FAQ
why is the cache key definition so important
The cache key controls what counts as a distinct response. Include a session cookie and you cache a unique response per user, defeating the CDN. Exclude a query parameter that changes content and you serve the wrong variant. The prompt makes the cache key an explicit design decision.
how should TTLs differ by content type
Content-hashed static assets can cache for a year because the URL changes when content changes. An SPA's HTML index should cache briefly so deploys reach users quickly. API responses typically should not cache unless they are public and stable.
why require a cache invalidation plan
Without a purge strategy, a deploy leaves users on stale content until each edge TTL expires. The prompt makes invalidation a required part of the configuration so you have a tested way to push a release to all edges when it matters.
You might also like
Popular tools from other categories that share themes with this one.
Try these next
More free tools from other corners of the catalog, picked by shared themes.