Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

From what Geoff said about improving (production) preformance, I have turned on trusted template cache in cfadmin.

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

So here is how to add this functionality to theFarcry Webtop (only tested in CF8).

(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>
(project or plugin)\packages\forms\configColdFusion.cfc
<cfcomponent extends="farcry.core.packages.forms.forms"  
             key="coldfusion" 
             displayname="ColdFusion Config" 
             hint="ColdFusion Server" 
             output="false">
    <cfproperty name="password" 
                type="string" 
                default="" 
                hint="Password for accessing CF Admin " 
                ftSeq="1" 
                ftFieldset="Server" 
                ftLabel="CF Password" 
                ftType="password" 
                ftRenderType="editpassword" 
                ftstyle="width:500px;" />
</cfcomponent>
  • No labels