Date: Fri, 29 Mar 2024 12:40:47 +0000 (UTC) Message-ID: <1081645041.1.1711716047632@a5f7199f022a> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_0_1203330081.1711716047619" ------=_Part_0_1203330081.1711716047619 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
You can improve (production) performance by turning on trusted c= ache 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= the FarCry Webtop so you can flush cache when you re-initialise the applic= ation.
<cfc= omponent displayname=3D"Update App"=20 hint=3D"Provides a granular way to update parts of the applica= tion state" extends=3D"farcry.core.packages.forms.UpdateApp"=20 output=3D"false"> =20 <cfproperty ftSeq=3D"101"=20 ftFieldset=3D"ColdFusion"=20 name=3D"cfCache"=20 type=3D"boolean"=20 default=3D"0"=20 hint=3D"Flush ColdFusion Trusted cache"=20 ftLabel=3D"Flush Trusted Cache" ftType=3D"boolean" /> <cffunction name=3D"processCFcache"=20 access=3D"public" returntype=3D"boolean"=20 description=3D"Reload PSL Service"=20 output=3D"false"> <cfset var oCFAdmin =3D createObject("component","cfide.adminapi= .administrator").login(application.fapi.getConfig('coldfusion','password'))= /> <cfset var oRuntime =3D createObject("component","cfide.adminapi= .runtime") /> <!--- Clear trusted cache ---> <cfset oRuntime.clearTrustedCache() /> <!--- Stop and restart trusted cache ---> <cfset oRuntime.setCacheProperty("TrustedCache", 0) /> <cfset oRuntime.setCacheProperty("TrustedCache", 1) /> <cfreturn true /> </cffunction> </cfcomponent>
<cfc= omponent extends=3D"farcry.core.packages.forms.forms" =20 key=3D"coldfusion"=20 displayname=3D"ColdFusion Config"=20 hint=3D"ColdFusion Server"=20 output=3D"false"> <cfproperty ftSeq=3D"1" name=3D"password"=20 type=3D"string"=20 default=3D""=20 hint=3D"Password for accessing CF Admin API" ftHint=3D"Password to allow FarCry access to the CF admin A= PI"=20 ftFieldset=3D"Server"=20 ftLabel=3D"CF Password"=20 ftType=3D"password"=20 ftRenderType=3D"editpassword"=20 ftstyle=3D"width:500px;" /> </cfcomponent>