Accessibility

TechNote (Archived)

ColdFusion MX 7: Using the Administrator API to clear the trusted cache

On the Caching page in the ColdFusion MX 7 Administrator, you can click a button to clear the trusted cache. The same functionality can be called using the new Administrator API. The following code demonstrates how to make the call to clear the trusted cache.

 <cfscript>
		
// Login is always required (if the administrator password // is enabled in the ColdFusion Administrator). // This example uses two lines of code. adminObj = createObject("component","cfide.adminapi.administrator"); adminObj.login("admin");
// Instantiate the runtime object. myObj = createObject("component","cfide.adminapi.runtime");
// clear cache myObj.clearTrustedCache();
/* Stop and restart trusted cache. However, only the clearTrustedCache function needs to be called. myObj.setCacheProperty("TrustedCache", 0); myObj.setCacheProperty("TrustedCache", 1); */
</cfscript>

Additional Information


For additional information, see the Administrator API documentation on LiveDocs.

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support

Document Details

ID:4c257834

Products Affected:

coldfusion