This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Caching of Query Results Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Caching of Query Results" Watch "Caching of Query Results" New topic
Author

Caching of Query Results

Raj Murthi
Greenhorn

Joined: Aug 29, 2005
Posts: 14
Sorry If u find simillar topic in Performance Category. I by mistake posted in Performance category.

I am having a question on caching of query results.

I am having an application in which I am displaying the user, records from sybase database.

When the first time I show the application form, correctdata is displayed .
Now I go to the database and truncate the table from which application form was fetching data.

Again if I refresh my application form, query is getting fired; But I am seeing the same old records even though they are not in database.

Although if I start another exe of my application and display the form then I am able to see no data(empty) which is correct.

I think the results of query are getting cached.

Can anyone tell me how this cached results can be disabled

Cheers
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30075
    
149

Raj,
Welcome to JavaRanch!

The first step is to isolate the problem. Try inserting some printlns. In particular, you want to see whether the query to the database is returning the new data.

In the future, you can e-mail or private message the moderator (or any sheriff) and they can just move your post for you.
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
1. Are you using a persistence layer (like Hibernate)? COuld it be caching the data.

2. Is this a web app? Could the browser be caching the page?
Raj Murthi
Greenhorn

Joined: Aug 29, 2005
Posts: 14
1. Are you using a persistence layer (like Hibernate)? COuld it be caching the data.
>>No

2. Is this a web app? Could the browser be caching the page?
>>Yes its an web app.
>>I also think browser might be caching the page,but even if delete temporary files same old data was getting displayed.

Also is there any possibility that Sybase Central might be caching the query results since I am firing the same query which contains same tables. If I change the query and diaplay some other results then again everything works fine.

Thanks...
 
wood burning stoves
 
subject: Caching of Query Results
 
Similar Threads
Particular server got memory issue
From Memory or from DB?
URLyBird Locking
Tomcat 6 and catche problem
Query Result Caching