Ok, well I tried Sean's sugguestion (Thank You Sean) but I'm missing
something. The error I'm getting is
"Variable TEMPLATECACHESIZE is undefined" on the cfset for CacheBefore.
I commented out all three lines for the getCacheProperty and ran it
again and got the same error on the cfset for temp2.

I know it's subtle, I just don't see it.

[BEGIN CODE]--------------------------------------------------
<!--- Login is always required. This example uses a single line of code.
--->
<cfset temp1 =
CreateObject("component","cfide.adminapi.administrator").login("password
")>

<!--- Instantiate the runtime object. --->
<cfset RuntimeObj = CreateObject("component","cfide.adminapi.runtime")>

<!--- Record Cache Size before clean --->
<cfset CacheBefore = RuntimeObj.getCacheProperty(TemplateCacheSize)>

<!--- Set Cache size down to 0. --->
<cfset temp2 = RuntimeObj.setCacheProperty(TemplateCacheSize, 0)>

<!--- Record Cache size during clean --->
<cfset CacheDuring = RuntimeObj.getCacheProperty(TemplateCacheSize)>

<!--- Set Template Cache size back to 64000. --->
<cfset temp3 = RuntimeObj.setCacheProperty(TemplateCacheSize, 64000)>

<!--- Record Cache size after clean --->
<cfset CacheAfter = RuntimeObj.getCacheProperty(TemplateCacheSize)>

<cfoutput>

CacheBefore: #cachebefore#<br>
CacheDuring: #cacheduring#<br>
CacheAfter: #cacheafter#<br>

</cfoutput>
[END CODE]-------------------------------------------------

-----Original Message-----
From: Sean Corfield [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 19, 2005 5:47 PM
To: CF-Talk
Subject: Re: Admin API

Sam also asked me offlist and my suggestion was to try using the Admin
API to set the template cache size to zero and then back to the usual
size (you can use getCacheProperty() / setCacheProperty()). Don't know
if it would work but it seems worth a try.

The same API also lets you turn trusted cache on and off, amongst other
things.

http://127.0.0.1:8500/CFIDE/componentutils/componentdetail.cfm?component
=CFIDE.adminapi.runtime

(or whatever port / context root you use)

On 4/19/05, Sam Smith <[EMAIL PROTECTED]> wrote:
> I've been reading through the Admin API for a little while now and it 
> seems that the function that I'm looking isn't exposed through it. 
> What I'm looking for is this. My boss asked me to create an app that 
> would clear the template cache of all our 17 CFMX 7 servers at once. I

> thought I could do that through the admin api, but no luck it seems. I

> may be missing something.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203583
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to