File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Using Query cache and second level cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Using Query cache and second level cache" Watch "Using Query cache and second level cache" New topic

Using Query cache and second level cache

ram shyam
Ranch Hand

Joined: May 04, 2007
Posts: 77

I would like to know if the following is possible to achieve using query cache mechanism.

Being a fresher to Hibernate, I understood the basic purpose of using query cache, ie, to fetch the data from the cache instead of fetching from the DB each and every time which increases the performance.

My requirement is as follows-
I fetch a set of 10 records from the DB and cache them using query cache and second-level cache. Now, would it be possible to fetch next or previous set of 10 records using already cached identifier values? If possible, could you please let me know how it can be achieved?
If not, is there any other means to achieve this?

Thanks in advance!!
[ May 10, 2007: Message edited by: deepa gr ]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32819

Moving this to our ORM forum since it has to do with Hibernate.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276


Please click on the My Profile link above and change your display name to meet the JavaRanch Naming Policy of using your real first and real last names, and no underscores.



Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Don't get me started about those stupid light bulbs.
subject: Using Query cache and second level cache
It's not a secret anymore!