This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If we are talking about the Query Cache, do the parameters of your query change? This will mean the cache needs rebuilt.
However, you mention ehcache, which suggests this might be about Second Level caching, which is nothing to do with Query Caching. In which case, you might want to check that your cache has not become full.
No, I am pretty sure that the query only return 1 result. And I am sure that the query parameters are the same everything i execute the query because I just reloading the same page again and again (which trigger the query with parameters).
I appreciate if anyone can give me some ideas to my problem.