Home

Conversation

$$21826
https://piefed.social/u/rimu posted on Apr 3, 2026 16:20
In reply to: https://cosocial.ca/users/evan/statuses/116340795950746048

Cache-Control and Vary

https://piefed.social/comment/10810465
Reply
$$21997
https://hhmx.de/users/nick posted on Apr 4, 2026 13:17
In reply to: https://cosocial.ca/users/evan/statuses/116340795950746048

@evan@cosocial.ca

None of them... yet... 😉

https://hhmx.de/users/nick/notes/2270716
Reply
$$22019
https://cosocial.ca/users/evan posted on Apr 4, 2026 14:09
In reply to: https://cosocial.ca/users/evan/statuses/116340795950746048

Thanks to everyone who replied! Unfortunately HTTP caching is not our strong suit in the ActivityPub world; HTTP Signature header(s) are a real public cache buster. But you can do at least some good caching per user. tags.pub provides ETag, and sends If-None-Match and If-Modified-Since, but doesn't do Last-Modified well yet.

https://cosocial.ca/users/evan/statuses/116346834056478847
Reply
$$22023
https://cosocial.ca/users/evan posted on Apr 4, 2026 14:25
In reply to: https://cosocial.ca/users/evan/statuses/116346834056478847

The problem with Signature: and Signature-Input:

If the server wants to say, "this content is different for different users", you use the Vary header. For OAuth, you'd use Vary: Authorization, say. And the cache knows to separate data for different users. Same OAuth token, you can reuse the cached data.

We include our ID in the Signature (or Signature-Input) header. But we also include a timestamp there, so every single request has a different signature (by design).

https://cosocial.ca/users/evan/statuses/116346896160203413
Reply