- Issue created by @tbkot
- ๐บ๐ฆUkraine tbkot
This patch adds results caching for one minute. To enable it add
$settings['commerce_pricelist_query_caching_enabled'] = TRUE;
to your settings.php
- last update
9 months ago Composer require failure - Status changed to Needs review
9 months ago 1:36pm 22 February 2024 - last update
9 months ago Composer require failure - ๐ฎ๐ฑIsrael jsacksick
Ok, I made several adjustments to the patch:
- The price list items is using the date in cache keys, but it's not necessary as we don't filter on it
- We need to add the price list IDS to the cache keys
- The static cache is not populated after fetching the price lists and price lists items resulting in duplicate cache calls
- We can in theory cache price list items indefintetly, as long as we associate the price list item list cache tags to it.
Now, the problem is, I realize caching could potentially break if anyone is altering queries using the tags as we wouldn't be aware of the conditions that need to be taken into account for the cache key.
- last update
9 months ago Composer require failure - ๐บ๐ฆUkraine tbkot
@jsacksick I've added some small changes in this patch.
- Call
parent::postDelete()
for proper cache invalidation - Add "commerce_pricelist_list" cache tag. Even though we invalidate the cached list of the "pricelist" IDs every minute, it is still a minute, and the pricelist could be deleted or dates can be changed
- Call
- ๐ฎ๐ฑIsrael jsacksick
@tBKoT: I think we can survive stale prices for 1 minute, but why not adding the tag. I think calling the parent postDelete() should be fixed separately as we can easily commit that.
This patch is a bit more controversial and might get committed. - last update
9 months ago Composer require failure - ๐บ๐ฆUkraine tbkot
Moved
parent::postDelete()
to the separate issue -> #3423660 ๐ Invalidate cache on price list delete Needs review - last update
9 months ago 22 pass, 3 fail - ๐ฎ๐ฑIsrael jsacksick
We don't need the customer ID and store ID in the cache keys for the price list items...
This could be a problem for sites altering the query but I guess these sites wouldn't use the caching in this case. The last submitted patch, 8: 3422933-8.patch, failed testing. View results โ
- last update
9 months ago Patch Failed to Apply - Status changed to Needs review
9 months ago 5:04pm 27 February 2024 - last update
9 months ago 30 pass - ๐ฎ๐ฑIsrael jsacksick
This will likely never go in, but posting an updated patch which should fix the tests still.