cached page coldfusion

I keep getting an old search result/query from coldfusion from browser. Another computer gets the new result for same search.  I clear browser cache did not help

Put this in header and still did not help
<cfheader name="cache-control" value="no-cache, no-store, must-revalidate">
 <cfheader name="pragma" value="no-cache">
 <cfheader name="expires" value="#getHttpTimeString(now())#">
 
Thanks

Ian WhiteOwner and FounderAsked:
Who is Participating?
 
devilJinKazamaConnect With a Mentor Commented:
i assume you have access to the administrator.

in the left menu bar you can see the 'Debugging and logging' section, in there you can go to 'debug output settings' and turn on the 'enable request debugging output' but make sure you add your IP first in the 'debugging IP addresses' section. if there are no ips there then CF will display debugging to all requests when turned on. after you add  your ip you should be able to see the debugging on your requests

once you have the debugging up and running, have a look at the two queries in the different browsers to see if they are the same, return the same amount of rows etc
0
 
devilJinKazamaCommented:
queries cannot be cached in the browser. you can cache resultsets in coldfusion using the cachedwithin or cachedafter parameters.

so if you are seeing different result sets , could be because different queries are being executed per session?

try dumping the queries and analyzing the results. also if you check debugging do the queries look the same on the two browsers?
0
 
Ian WhiteOwner and FounderAuthor Commented:
I have coldfusion only on the server not on my PC  How do I turn on debugging so I can see the
code executing - not for production just testing  I have a /test  directory for testing

Thanks
Ian
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
Ian WhiteOwner and FounderAuthor Commented:
Not sure what caused the problem. Maybe the query got cached on the server.Resolved the next day
Thanks for you help
0
 
Ian WhiteOwner and FounderAuthor Commented:
thankyou
0
 
devilJinKazamaCommented:
happy to help, or in this case try to help  :-)

if it was cached by CF, your code would look something like this

<cfquery name="foo" datasource="foo" cachedwithin="#createtimespan(1,0,0,0)#">

meaning cache the query for a day and re-run

if you want that not to happen simply remove the cachedwithin parameter

<cfquery name="foo" datasource="foo">
0
 
Ian WhiteOwner and FounderAuthor Commented:
Thanks but I have never used cachedwithin

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.