Trusted Cache via CF Admin API
Funktion kann direkt aus einer Anwendung aufgerufen werden.
Code:
< cfscript>
// Login is always required (if the administrator password
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>