aspose file tools*
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 Soft Skills this week in the Jobs Discussion 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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31057
    
232

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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Caching of Query Results