Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

From what Geoff said about improving

Excerpt

You can improve (production)

preformance, I have turned

performance by turning on trusted

template cache in cfadmin.

But everytime I do a Farcry update app I forget to flush the cache first (sad)

So here

cache for your ColdFusion server. However, it's easy to forget that trusted cache is on when you do an update. Here is how to add this functionality to

theFarcry Webtop

the FarCry Webtop so you can flush cache when you re-initialise the application (only tested in CF8).

Code Block
title(project or plugin)\packages\forms\UpdateApp.cfc
<cfcomponent displayname="Update App" 
             hint="Provides a granular way to update parts of the application state"
             extends="farcry.core.packages.forms.UpdateApp" 
             output="false">
       
    <cfproperty ftSeq="101" 
                ftFieldset="ColdFusion" 
                name="cfCache" 
                type="boolean" 
                default="0" 
                hint="Flush ColdFusion Trusted cache" 
                ftLabel="Flush Trusted Cache" ftType="boolean" />

    <cffunction name="processCFcache" 
                access="public" returntype="boolean" 
                description="Reload PSL Service" 
                output="false">

        <cfset var adminObj = createObject("component","cfide.adminapi.administrator").login(application.fapi.getConfig('coldfusion','password')) />
        <cfset var oRuntime = createObject("component","cfide.adminapi.runtime") />

        <cfset oRuntime.CLEARTRUSTEDCACHE() />
       
    <cfreturn true />
    </cffunction>

</cfcomponent>

...