• Post Reply Bookmark Topic Watch Topic
  • New Topic

OpenJpa query caching is not refreshing in case of null value

Awadhendra Tiwari
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!