fix(medusa): Dont set cache if ignore_cache option is true (#5408)
* Dont 'set' in cache if ignore_cache option is true * Create big-countries-drive.md --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Oli Juhl
parent
aba9ded2a3
commit
c1cabac721
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Dont 'set' in cache if ignore_cache option is true
|
||||||
@@ -96,7 +96,9 @@ class PriceSelectionStrategy extends AbstractPriceSelectionStrategy {
|
|||||||
await Promise.all(
|
await Promise.all(
|
||||||
[...results].map(async ([variantId, prices]) => {
|
[...results].map(async ([variantId, prices]) => {
|
||||||
variantPricesMap.set(variantId, prices)
|
variantPricesMap.set(variantId, prices)
|
||||||
await this.cacheService_.set(cacheKeysMap.get(variantId)!, prices)
|
if (!context.ignore_cache) {
|
||||||
|
await this.cacheService_.set(cacheKeysMap.get(variantId)!, prices)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user