Caching product results in frontend
Taking advantage of Rails collection caching to perform multi get if possible it fetches multiple items at once instead of one by one if the cache storage driver allows it.
Added as point of reference about how to make Solidus stores even faster.
Checklist:
- [x] I have followed Pull Request guidelines
- [x] I have added a detailed description into each commit message
- [x] I have updated Guides and README accordingly to this change (if needed)
- [x] I have added tests to cover this change (if needed)
- [x] I have attached screenshots to this PR for visual changes (if needed)
looks legit
Your job ran 5570 tests with 1 failure
products busts the cache when a product is updated - spec.features.caching.products_spec
spec/features/caching/products_spec.rb
Failure/Error: expect(cache_writes.count).to eq(2)
expected: 2
got: 1
(compared using ==)
./spec/features/caching/products_spec.rb:27:in `block (2 levels) in <top (required)>'
Hello @softr8 ! Can you port this to https://github.com/solidusio/solidus_starter_frontend? SolidusStarterFrontend is the new default frontend of Solidus. We will be removing solidus_frontend from the Solidus meta-package gem in v4. Please see https://github.com/solidusio/solidus/blob/a7de972427a86f1955cd7edb5bd0f0c6a688c347/CHANGELOG.md#new-solidus-starter-frontend.
@softr8 closing this, thanks!
Ok, will do!