AlchemyCMS / alchemy_cms

Alchemy is the Open Source Rails CMS framework for the component based web that can be used as classic server side rendered or headless CMS.
https://www.alchemy-cms.com
BSD 3-Clause "New" or "Revised" License
839 stars 315 forks source link

Use page version's `updated_at` timestamp as cache key #2862

Closed mamhoff closed 4 months ago

mamhoff commented 5 months ago

What is this pull request for?

Currently, it's hard for us to invalidate caches for Alchemy pages when content that's referenced through ingredients with related objects changes.

For example, in a situation where a user combines Alchemy and Solidus using the alchemy_solidus gem, a page's cache key does not update when a product that's referenced through a SpreeProduct ingredient changes.

There's a PR up on the alchemy_solidus gem that touches ingredients in these situations, and with this change, that touching can be used for breaking caches. [1]

1

Checklist

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.93%. Comparing base (f6b6ad5) to head (6787e96). Report is 20 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2862 +/- ## ========================================== + Coverage 95.86% 95.93% +0.07% ========================================== Files 229 229 Lines 6211 6224 +13 ========================================== + Hits 5954 5971 +17 + Misses 257 253 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.