We should use this feature to cache all the individual ticket responses, and purge the cache tag associated with this ticket after deletion.
return new Response(body, {
headers: {
"Cache-Control": "public, max-age=300, stale-while-revalidate=3600",
"Cache-Tag": "ticket:123",
},
});
await ctx.cache.purge({ tags: ["ticket:123"] });
CF Workers finally support intuitive way of caching.
https://blog.cloudflare.com/workers-cache/
We should use this feature to cache all the individual ticket responses, and purge the cache tag associated with this ticket after deletion.