Skip to content

Commit 3915110

Browse files
Add controlling-cache-ttl-in-cloudflare-worker
1 parent 1f51b14 commit 3915110

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
layout: post
3+
title: "Controlling cache TTL in CloudFlare worker"
4+
tags: [CloudFlare, Caching, CloudFlare Workers]
5+
author: Andreas Bjørn Hassing
6+
---
7+
8+
I've been playing around with CloudFlare workers and pages to host a homebrewn app in front of our local washing house
9+
app data. I wasn't a big fan of the existing one so I set out to bake one that worked better for me.
10+
11+
(Result: <https://vask.zenbit.dk>)
12+
13+
When playing around with caching, because I don't want to be a burden to the official backend, I was trying to understand
14+
how I could utilize [workers caching API](https://developers.cloudflare.com/workers/runtime-apis/cache/) in that effort.
15+
16+
The response from the official backend has a `Cache-Control` header set to `private`, meaning that clients should decide
17+
themselves how to cache results. Browsers will generally not cache results with that header key value, CloudFlare adopted
18+
the same behavior.
19+
20+
To be continued...

0 commit comments

Comments
 (0)