no they aren't. If you set a request variable in the application.cfm it's
pretty much the same as setting a local variable in terms of persistence...
every page will recreate the variable anew.
Request variables are different, though, from local variables in that they
can be seen inside of custom tags without specifically passing the
parameter.
One tecnique used often is to set the variable in the application scope in
the application.cfm page (using proper locking, of course) and then to copy
the variable into the request scope immediately after. This way you save
the cost of creating the variable every page load and/or locking a shared
scope every time the variable is used... and trade it for the smaller
footprint caused by copying the variable from the persistent shared scope to
the request scope.
|-----Original Message-----
|From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, May 29, 2001 9:43 AM
|To: CF-Talk
|Subject: RE: Request vs application scope
|
|
|Brilliant! So what's the downside? The variables are not
|persistent across
|pages are they?
|
|
|
|> -----Original Message-----
|> From: Daniel Lancelot [mailto:[EMAIL PROTECTED]]
|> Sent: Tuesday, May 29, 2001 2:56 PM
|> To: CF-Talk
|> Subject: RE: Request vs application scope
|>
|>
|> Yes thats right.
|>
|> -----Original Message-----
|> From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
|> Sent: 29 May 2001 13:51
|> To: CF-Talk
|> Subject: RE: Request vs application scope
|>
|>
|> Thanks.
|>
|> Can I put any data in there that I want to use across the site?
|> And I don't
|> have to apply CFLOCKs do I?
|>
|>
|>
|> > -----Original Message-----
|> > From: Daniel Lancelot [mailto:[EMAIL PROTECTED]]
|> > Sent: Tuesday, May 29, 2001 2:32 PM
|> > To: CF-Talk
|> > Subject: RE: Request vs application scope
|> >
|> >
|> > Absolutely no problem... I do it regularly...
|> >
|> > -----Original Message-----
|> > From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
|> > Sent: 29 May 2001 08:34
|> > To: CF-Talk
|> > Subject: Request vs application scope
|> >
|> >
|> > I am using the following line of code in my application.cfm
|> >
|> > <cfset request.HomeDir =
"http://127.0.0.1/work/ACME/may2001/website">
> >
> > Then elsewhere in the site I refer all links and images to:
> >
> > <cfoutput>#request.HomeDir#</cfoutput>
> >
> > Is this OK to do? I'm trying to avoid using the application
> > scope. Are there
> > any known of issues with this method?
> >
> > Thanks.
> > Steve
> >
> >
> >
> >
> >
> > Development Manager
> > Vardus Internet Solutions (SA)
> >
> > Tel: (+27) 21 670 9880
> > Fax: (+27) 21 674 4549
> >
> > Email: [EMAIL PROTECTED]
> > Website: www.vardus.com
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists