solidus icon indicating copy to clipboard operation
solidus copied to clipboard

Caching product results in frontend

Open softr8 opened this issue 6 years ago • 1 comments

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)

softr8 avatar Nov 14 '19 00:11 softr8

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)>'

JuanCrg90 avatar Nov 14 '19 16:11 JuanCrg90

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.

gsmendoza avatar Aug 24 '22 08:08 gsmendoza

@softr8 closing this, thanks!

kennyadsl avatar Aug 24 '22 09:08 kennyadsl

Ok, will do!

softr8 avatar Aug 24 '22 15:08 softr8