🦔 PostHog provides open-source web & product analytics, session recording, feature flagging and A/B testing that you can self-host. Get started - free.
We serve some assets from cloudfront. This is bueno because they have deployment specific names like 1c-2MRDOHUS.js
We have some assets with fixed names.
Maybe only toolbar.js and toolbar.css.
This means if we deploy a fix to the toolbar (and don't realise this) people only get the fix 24 hours later. And, if we deploy a change and then test it in production we're not really testing the new code.
The cache policy is
data "aws_cloudfront_cache_policy" "this" {
name = "Managed-CachingOptimized"
}
If we extend this to allow it to be varied by a t=blah header then posthog-js could add this header so that we can control the cache length. E.g. you could set a t=blah so that any five minute window from any client would get the same value so that we have a five minute cache.
We serve some assets from cloudfront. This is bueno because they have deployment specific names like
1c-2MRDOHUS.js
We have some assets with fixed names.
Maybe only toolbar.js and toolbar.css.
This means if we deploy a fix to the toolbar (and don't realise this) people only get the fix 24 hours later. And, if we deploy a change and then test it in production we're not really testing the new code.
The cache policy is
If we extend this to allow it to be varied by a
t=blah
header then posthog-js could add this header so that we can control the cache length. E.g. you could set at=blah
so that any five minute window from any client would get the same value so that we have a five minute cache.