2

When second level caching is enabled with Hibernate, it seems to have a lot of limitations like the information from the cache can be queried only using the primary key and usage of joins.

I think this seriously limits the advantages of using 2nd level cache unless we are querying for something that changes rarely. Most of the times, there will be a requirement to query the database on several criteria, not just primary key and also there may be several lazy associations for the table which needs to load.

So the caches like Ehcache etc don't seem to solve this problem. Are there any frameworks which solve this problem?

Like I can load certain range of a database table into a cache and use it for some time from the cache before invalidating and reloading the information again from the database?

  • After some effort, I found csql which can cache the database tables(not hibernate second level cache). But it doesn't seem to have any recent updates. I am not sure if there are any alternative for csql. codeproject.com/Articles/26616/… – kiran Apr 3 '16 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.