Actually you can do this with some undocumented CF functions. For
example,
<!---check to see if trusted cache is turned on--->
<CFREGISTRY ACTION="Get"
BRANCH="HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion\
Server
"
ENTRY="AssumeTemplateCacheIsNotDirty"
TYPE="String"
VARIABLE="r_value">
<cfif r_value neq "1">
<cfabort showerror="Trusted Cache is not enabled. It is not
necessary to run this script if Trusted Cache is disabled. Processing
aborted since this script would enable trusted cache.">
</cfif>
<!--- update the CF trusted cache setting to 0 --->
<CFREGISTRY ACTION="Set"
BRANCH="HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion\
Server
"
ENTRY="AssumeTemplateCacheIsNotDirty"
TYPE="String"
VALUE="0">
<!--- have CF reread the registry --->
<cfset temp = CFUSION_SETTINGS_REFRESH()>
<!--- call the changed file(s) to re-read the pcode --->
<cfloop list="#myFileList#" index="template">
<CFINTERNALDEBUG
ACTION="pcode"
OUTVAR="r_var"
TEMPLATEPATH="#template#">
</cfloop>
<!--- turn truested cache back on --->
<CFREGISTRY ACTION="Set"
BRANCH="HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion\
Server
"
ENTRY="AssumeTemplateCacheIsNotDirty"
TYPE="String"
VALUE="1"
>
<!--- have CF reread the registry --->
<cfset temp = CFUSION_SETTINGS_REFRESH()>
You can basically set #myFileList# to contain the list of files that
you
want to recache. (note you must pass the fully qualified path and
filename)
Hope this helps.
Timothy Stadinski
Senior Software Engineer
Afternic.com
[EMAIL PROTECTED]
-----Original Message-----
From: Michiel Boland [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 11:00 AM
To: CF-Talk
Subject: Re: Un cache all queries or some queries
> I also want to ask, how can I flush the templates from memory without
> restarting the CF Server.
> I want to alter one page on the production server without having to
stop
> and restart the CF Server.
AFAIK there is no way to flush either the query or the code cache.
If you have CF5 you can turn trusted cache off, hit your page once, and
then turn TC back on.
Cheers
Michiel
______________________________________________________________________
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists