Anthony Accioly on Nostr: GM folks. Quick question for folks who understand HTTP caching on reverse proxies ...
GM folks. Quick question for folks who understand HTTP caching on reverse proxies like Squid or Cloudflare. If I have a GET REST endpoint responding with 200 OK and the following headers:
Cache-Control: public, max-age=3600
ETag: "123-a"
The proxy should cache and serve the response without hitting the underlying server more than once for the first hour, then send a request with If-Match: "123-a" when the cache goes stale, right? Is there any reason why it wouldn’t?
#gm #asknostr #devstr #http #caching #etag #rest #tech
Published at
2025-03-22 12:00:07Event JSON
{
"id": "16ba7f40bd78fa35d91723470232a5b1a4dfb72bca3098a9f45e584bcc334abf",
"pubkey": "ee9d979e7e1418a9f7472baf82dc96082a0d4251b77bcb170a6ecec93fadff64",
"created_at": 1742644807,
"kind": 1,
"tags": [
[
"t",
"gm"
],
[
"t",
"asknostr"
],
[
"t",
"devstr"
],
[
"t",
"http"
],
[
"t",
"caching"
],
[
"t",
"etag"
],
[
"t",
"rest"
],
[
"t",
"tech"
]
],
"content": "GM folks. Quick question for folks who understand HTTP caching on reverse proxies like Squid or Cloudflare. If I have a GET REST endpoint responding with 200 OK and the following headers:\n\nCache-Control: public, max-age=3600 \nETag: \"123-a\"\n\nThe proxy should cache and serve the response without hitting the underlying server more than once for the first hour, then send a request with If-Match: \"123-a\" when the cache goes stale, right? Is there any reason why it wouldn’t?\n\n#gm #asknostr #devstr #http #caching #etag #rest #tech",
"sig": "3dbd2fcc0e67e8fdb59223a0058e99478dd8fefc67dae90cc6bbc9baad60b098128091ee207586bff8e0d54d20caaa2f52a4d7b4acfaf8ee023165392e90e8cb"
}