Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Caching of Query Results

 
Raj Murthi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic