Skip to content

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

  1. Run rails dev:cache on the terminal to enable fragment caching on development environment.
  2. Make sure cache_home_panel feature is enabled. If not, enable it: Feature.enable(:cache_home_panel)
  3. Browse to: http://localhost:3000/
  4. Click on a project from the projects list
  5. Star/un-star/fork that project
  6. Reload the page
  7. 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.

Related to #371777 (closed)

Edited by Mansoor Khan

Merge request reports