Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh data from SQL Server

Status
Not open for further replies.

hp22015

Programmer
May 19, 2003
19
0
0
US
Hi all

I have SQL Server 2000 and Coldfusion Sever 6.0.0.48097. What happen is I have entered some new values into the lookup tables. However, the new values don't get populated when I call the page. I have tried to refresh the browser (IE 5) but it doesn't help. Plus, when entering the new values into the lookup tables, I also delete the old values. However, the page still shows the old values. I notice that the application variable is set at 2 day for the expiration.

What do I need to do in order to see the new values from the lookup tables right away. Please advise. Thanks.

HP

 
Under normal circumstances, ColdFusion will display current data. So, if you're seeing old data, you're not running under "normal circumstances".

Somewhere, the data is getting cached. You can try doing a browser refresh while holding the CTRL key... this will ensure that the page isn't cached at the browser level.

But, chances are it's being cached at the server level. This can be done in several ways... and nailing down which way is being used in your particular case would involve a deeper exploration of your pages and code and database setup than would really be appropriate here.

There are some things that you can check out on your own, though.
[ol]
[li]Queries can be cached at the database[/li]
[li]with SQL Server, I believe they can be cached at the driver... possibly configurable within CF Administrator[/li]
[li]And they can be cached by ColdFusion itself[/li]
[/ol]
To be cached by ColdFusion, you'd usually need to have a
Code:
cachedwithin
or
Code:
cachedafter
attribute on the master query... and it should be fairly evident. You do need to make sure that you're looking at the master CFQUERY, if you're doing anything like query-on-queries. Any QoQ's don't necessarily need caching attributes... but may still be cached at the query that they're running queries on (if that makes sense).


-Carl
 
Hi Carl

Thank you so much for your advise. As I am the only one who is testing the application, I believe the cache level is set to high. For that reason, I can't see the new values right away. (I hope that is the case).

Anyway, I make some changes in the code and use cachedwithin(0,0,0,0) and also set the cache level from server at a small number. The application works great now.

Thank you again for your valuable advice. Take care.

HP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top