<cfset CacheBefore = RuntimeObj.getCacheProperty(TemplateCacheSize)> You are referencing the variable "TemplateCacheSize" before defining it ;-) perhaps I'm missing something??
Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ----- Original Message ----- From: "Sam Smith" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Tuesday, April 19, 2005 3:32 PM Subject: RE: Admin API > 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. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203584 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

