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

Automatically purge cache on modification of ContentSource #4587

Open
stacimc opened this issue Jul 1, 2024 · 0 comments
Open

Automatically purge cache on modification of ContentSource #4587

stacimc opened this issue Jul 1, 2024 · 0 comments
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: api Related to the Django API

Comments

@stacimc
Copy link
Contributor

stacimc commented Jul 1, 2024

Problem

When a ContentSource is modified in the Django admin, the changes may not be visible in the frontend immediately due to caching. For instance if a ContentSource is updated to Hide content, the hidden source may still appear in the frontend if it's getting the cached response for the stats endpoint. This is problematic because we'd like hiding/un-hiding sources to have immediate effect.

Description

We should purge the Cloudflare cache for the stats endpoint whenever ContentSource is modified. We can do this with the Cloudflare API for purging cached content by URL as described here. Note that we should make sure to purge by exact URL match rather than prefix, as only the former is free.

@stacimc stacimc added 🟨 priority: medium Not blocking but should be addressed soon ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🧱 stack: api Related to the Django API labels Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: api Related to the Django API
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant