Caching price lists and price list items queries

Created on 21 February 2024, 9 months ago
Updated 27 February 2024, 9 months ago

Currently, on every request, the pricelist repository performs queries to load the applicable price lists, and applicable prices for a given variation.
There is only static caching in place in loadPriceListIds() and loadItems().

I think we can easily cache the queries performed for 60 seconds, reducing the number of duplicate queries.
For that, we can copy the approach from the PromotionStorage, and modify the time used for the cache key.

Iโ€™m suggesting we change the date format from DateTimeItemInterface::DATETIME_STORAGE_FORMAT to โ€˜Y-m-d\TH:i:00'. This way weโ€™ll cache prices for the current โ€œminuteโ€.

๐Ÿ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ฆUkraine tbkot

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024