Expire fragment cache when project star count or fork count has changed
What does this MR do and why?
This change invalidates cache on project details page on starring/un-starring/forking the project to reflect correct star count.
How to set up and validate locally
- Run
rails dev:cache
on the terminal to enable fragment caching on development environment. - Make sure cache_home_panel feature is enabled. If not, enable it:
Feature.enable(:cache_home_panel)
- Browse to: http://localhost:3000/
- Click on a project from the projects list
- Star/un-star/fork that project
- Reload the page
- Verify that star/fork count is correct
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #371777 (closed)
Edited by Mansoor Khan