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

Purge cache by tag #182

Closed
wants to merge 4 commits into from
Closed

Purge cache by tag #182

wants to merge 4 commits into from

Conversation

tc80
Copy link
Member

@tc80 tc80 commented Aug 14, 2020

Addresses #178 .

The bot will purge our CF zone's cache using tags.

  • If a new package is found, purge /packages tag (contains list of all pkgs).
  • If new versions were added or a package's metadata was updated, purge <pkg name> tag (package-level metadata, list of versions, aggregated metadata)

We need to be careful of race conditions.

  • If cache is purged but KV values are not yet propagated globally, it is possible the Worker will fetch stale entries from KV and cache them.
  • Maybe we can set Worker's max-age to a day instead of a year (if we implement this)

If we do this change, we will need to update bot-ansible:

  • WORKERS_KV_ACCOUNT_ID --> CF_ACCOUNT_ID
  • WORKERS_KV_API_TOKEN --> CF_API_TOKEN
  • need to add CF_ZONE_ID
  • need to update privileges of CF_API_TOKEN to be able to purge zone's cache

@tc80 tc80 closed this Aug 19, 2021
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.

2 participants