• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Caching of Query Results

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic