Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalidate the cache on Fastly using surrogate keys #72

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

jdno
Copy link
Member

@jdno jdno commented Jun 14, 2023

Fastly does not support wildcard invalidations through its URL-based API, and also does not support invalidating a path prefix like /dist/. We are therefore switching to surrogate keys. Requests that match the path ^\/dist\/ get tagged with the surrogate key /dist/*, which is then used when invalidating the cache after a release.

The tagging implementation can be found in rust-lang/simpleinfra#295.

Fastly does not support wildcard invalidations through its URL-based
API, and also does not support invalidating a path prefix like `/dist/`.
We are therefore switching to surrogate keys. Requests that match the
path `^\/dist\/` get tagged with the surrogate key `/dist/*`, which is
then used when invalidating the cache after a release.

The tagging implementation can be found in rust-lang/simpleinfra#295.
jdno added a commit to jdno/rust-simpleinfra that referenced this pull request Jun 14, 2023
The cache invalidation on Fastly for releases has been refactored to use
surrogate keys instead of paths[^1]. This removes the need to set the
static domain for Fastly, but requires passing in the respective service
id. The service ids for dev-static and static have already been
configured as SSM parameters.

[^1]: rust-lang/promote-release#72
@jdno jdno merged commit 5f7edbc into rust-lang:master Jun 15, 2023
@jdno jdno deleted the fastly-surrogate-keys branch June 15, 2023 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant