Application.cfm runs with every request. If you set a variable in Application.cfm then the variable is set with every request.
Chris Norloff ---------- Original Message ---------------------------------- from: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] date: Tue, 26 Mar 2002 13:48:27 -0500 >if you declare the variable inside the application.cfm, then you don't have >to set them with every request. > >Anthony Petruzzi >Webmaster >954-321-4703 >http://www.sheriff.org > > >-----Original Message----- >From: Chris Norloff [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, March 26, 2002 1:46 PM >To: CF-Talk >Subject: RE: cfparam vs. cfif/isDefined/cfset > > >So you don't have to set the variable again and again, with every request. > >Chris Norloff > >---------- Original Message ---------------------------------- >from: [EMAIL PROTECTED] >Reply-To: [EMAIL PROTECTED] >date: Tue, 26 Mar 2002 13:18:40 -0500 > >>why use the application scope, when you have the request scope and you >don't >>have to mess with locking. >> >>Anthony Petruzzi >>Webmaster >>954-321-4703 >>http://www.sheriff.org >> >> >>-----Original Message----- >>From: Chris Norloff [mailto:[EMAIL PROTECTED]] >>Sent: Tuesday, March 26, 2002 1:11 PM >>To: CF-Talk >>Subject: Re: cfparam vs. cfif/isDefined/cfset >> >> >>Yes, they MUST be locked. >> >>These look like variables that don't change - I'd do a CFIF test on one, >and >>if it doesn't exist then set them all. As long as you always set them all >>together, you can use the existence of one to test for all. >> >>This way the app vars are set only once, and don't bog down your pages, >>since Application.cfm is called with every request. >> >>Chris Norloff >> >>---------- Original Message ---------------------------------- >>from: "Earl, George" <[EMAIL PROTECTED]> >>Reply-To: [EMAIL PROTECTED] >>date: Tue, 26 Mar 2002 11:21:07 -0500 >> >>>Here is my application.cfm file: >>> >>><cfapplication name="appname" applicationtimeout=#CreateTimeSpan(2, 0, 0, >>>0)#> >>> >>><cfparam name="application.appnameroot" default="/appname"> >>><cfparam name="application.includesDir" default="/appname/includes"> >>><cfparam name="application.imagesDir" default="/appname/images"> >>><cfparam name="application.menusDir" default="/appname/menus"> >>><cfparam name="application.templatesDir" default="/appname/templates"> >>><cfparam name="application.smapDir" default="/appname/smap"> >>> >>>Should I be locking these cfparam tags? Should I wrap them all in one lock >>>or should I lock each one individually? >>> >>>What is the difference between using cfparam tags as I have above and >using >>>cfif with isDefined and cfset to accomplish the same thing? Is one method >a >>>better practice than the other? >>> >>>Thanks! >>> >>>George >>>[EMAIL PROTECTED] >>> >> >> > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists