We have a scenario where we need to update userPriceGroup using an admin account. One product in our site can have multiple prices depending on user tier. The problem happens when we call this endpoint of ProductsController, /{baseSiteId}/products/{productCode}. It does not return the correct price immediately after changing the tier. We noticed there's a slight delay when returning the correct response. We then reviewed the controller again and noticed the @Cacheable annotation. Is there a way on our backend side to disable below code? Do we need to override this controller and in that child controller, remove the @Cacheable? Thanks in advance to anyone who can provide their knowledge in our predicament.
@CacheControl(directive = CacheControlDirective.PRIVATE, maxAge = 120) @Cacheable(value = "productCache", key = "T(de.hybris.platform.commercewebservicescommons.cache.CommerceCacheKeyGenerator).generateKey(true,true,#productCode,#fields)") Scenario: Admin changes tier from Bronze to Gold
- Bronze price: 582
- Gold price: 552
- Expected after tier update: 552
- Actual after tier update: 582
Источник: https://stackoverflow.com/questions/780 ... controller
Мобильная версия