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:
Florent Quienne
2023-10-19 15:43:17 +02:00
committed by GitHub
parent aba9ded2a3
commit c1cabac721
2 changed files with 8 additions and 1 deletions

View File

@@ -96,7 +96,9 @@ class PriceSelectionStrategy extends AbstractPriceSelectionStrategy {
await Promise.all(
[...results].map(async ([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)
}
})
)