How about changing the trusted cache setting on the fly?

<cfif *refreshcache*>
<cfset *trustedcache* = off>
<cfinclude template="myinclude.cfm">
<cfset *trustedcache* = on>
<cfelse>
<cfinclude template="myinclude.cfm">
</cfif>

Obviously the *trustedcache* part would need to be figured out - presumably registry in CF5 and the factory object in MX - but would this be inadvisable?
After all its only going to mimic what happens in CFadmin.

Bert

>
> -----Original Message-----
> From: Tom Jordahl [mailto:[EMAIL PROTECTED]
> Sent: 24 November 2003 19:59
> To: CF-Talk
> Subject: RE: Clearing Trusted Cache in CF 5
>
>
> Trusted cache will prevent ColdFusion (5 or MX) from checking
> the disk for
> the file timestamp.
>
> This can have a medium to large-ish performance impact.  Huge if your
> templates are mounted across the network on a file server.
>
> You can switch this setting on/off without restarting the
> server, so you can
> update a template, flip the switch off, request that page to clear the
> cache, and then flip the switch on again.  All without
> restarting.  This is
> by design.
>
> If you have a large number of pages that you are updating, a
> restart would
> probably be better, or (as Jon Block mentioned) a regression
> script which
> hits every page in your app (using cfhttp).
>
> Macromedia recommends that all performance sensitive sites
> turn trusted
> cache on.
>
> --
> Tom Jordahl
> Macromedia Server Development
>



[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to