-
-
Notifications
You must be signed in to change notification settings - Fork 121
Description
Is your feature request related to a problem? Please describe.
We are currently not caching 404s. So they are quite slow as they need to reach out to us-east-1
S3 bucket.
Maybe this is by accident as the VCL code does have sections named cache-is-404
However if we want to cache 404s we need to be able to purge them on channel bumps.
Describe the solution you'd like
We can create an S3 Event Notification that triggers a Lambda every time an object is PUT
into the bucket. The lambda then simply does a curl -XPURGE https://cache.nixos.org/<key>
Describe alternatives you've considered
Have some script in Hydra do this
Additional context
We do around 12 million PUTs per month to S3
Lambda costs $0.20
per million requests. So this would cost $2.40
per month