Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Caching of Query Results

 
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
 
author & internet detective
Posts: 40200
816
Eclipse IDE VI Editor Java
  • 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.
 
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...
 
Liar, liar, pants on fire! refreshing plug:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic