[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

Result set doesn't refresh

My application does some simple queries (cfupdates, cfinserts), but sometimes the results displayed don't accurately reflect the contents of the database.  My browser is set to reload the page on every visit and the database does have the correct data in it during these queries.  Does CF cache resultsets or use cached pages even though disabled in the browser (IE)?  Any other ideas?  Please help.  Thanks.
0
peteodonnell
Asked:
peteodonnell
  • 2
1 Solution
 
acampomaCommented:
I had the same problem. and I found this solution on a site called www.cfnewbie.com
let me know if it works!!
Alex


Insert these line at the top of your templates.
<meta http-equiv="pragma" content="nocache">
<meta http-equiv="expires" content="1 January 1900 00:00:00 PST">

I actually put them in my application.cfm
0
 
peteodonnellAuthor Commented:
The problem was actually that a query was being executed in the application.cfm and later javascript was attempting to load multiple frames also executing queries.  
Somehow I think CF was caching old resultsets because of this.  
This leads me to another question.  Is the application.cfm prepended to all templates loaded?  Do you know of any good documentation on the application.cfm and how it is actually processed?
0
 
acampomaCommented:
The application.cfm is prepended to all cold fusion templates in any subfolder.
if you have an application.cfm in your main directory, all templates will use this application.cfm unless there is another application.cfm in a subdirectory. Any templates in that subdirectory or lower will use the second application.cfm file.
I have found some documentation on the topic in mastering cold fusion 4.
But mainly I just usee the application.cfm for for global variables such as database name, background, etc.
hope this helps
Alex
 
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now