cancel
Showing results for 
Search instead for 
Did you mean: 

How to invalidate a Query cache?

abhisheksaphybris
Participant
0 Kudos

Hi,

I have a number of web requests running at a time to access some DB values. Each transaction invokes the DB once and also updates the value.

All the requests are running almost in-parallel (though requests sent one by one, but processed very fast). I noticed that I was not getting the updated value from DB; means the query cache was not invalidated properly.

Is there a way to invalidate the query cache ; such that I could get the latest value which was recently updated by another request?

I see following statement which could be the root cause of my problem but I am looking for the solution 😞 "There are circumstances where the invalidation is delayed, for example when working with transactions. By default, entries modified inside a transaction are invalidated after the transaction." https://wiki.hybris.com/display/release5/hybris+Platform+Cache

Thanks, Abhishek

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

CacheRegion region = ...; region.clearCache();

https://help.hybris.com/1811/hcd/8c392bd686691014ae1bf4af383a81d5.html