OpenJpa query caching is not refreshing in case of null value
posted 1 year ago
Good Morning everyone,
I am facing some problem in OpenJpa second level caching. Most of times caching is working but in one particular case it is not working. Here is a scenario when it is not working,
When your code result null value then it store it into cache and then it never clear that value. Although it clears values only when query returns a value.
Here is code which I had written to get value from database,
And here is a code which refresh cache.
And this is persistence.xml code
Everything working fine when query always returns value. The problem is start when it return null value. Then first time is store in cache and then it never refresh.
I am using OpenJpa2 and Hibernate. Help me as I am stuck here from last 3 days and I didn't get any solution.