Thank you, yes it does make more sense. It's basically a means to save a
number of rarely changing variables in memory to increase performance. There
certainly are a lot of possible mistakes that can be made very easily,
though.
I'm actually working on rebuilding a site that uses application variables
very haphazardly. Now I know one of the reasons that I have to keep
restarting the cold fusion service.
> -----Original Message-----
> From: Stephen Moretti (IVL Onsite) [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 27, 2000 11:07 AM
> To: Fusebox
> Subject: Re: Why use shared scope variables?
>
>
> Hi Neil,
> >
> > The writer does recommend not using application variables for the
> datasource
> > name:
> > "Although application variables are widely used to store data source
> names,
> > it probably makes more sense to avoid using an application variable in
> this
> > case. This can be done by instead setting a request scope
> variable in the
> > application.cfm file."
> >
> Whoops! Must have skipped that bit... Don't know why they think that....
>
> >
> > I could just as easily keep all of my request scope variable in
> one place.
> > Without having the drawbacks of locking requirements. It seems that the
> more
> > variables that are set using shared scope the greater the
> performance loss
> > due to locking requirements.
> >
> > Let me rephrase my question. Why would I use shared scope variables over
> > request scope variables?
> >
> You could just as easily set them all as requet scope, but that would mean
> that every user on your site would use a piece of the memory on
> your server
> and use the server *everytime* they hit the application.cfm to set those
> variables. If you use a CFIF that checks the status of a key application
> variable around your CFSETs then all you do it hit the server
> everyone once
> in a while and use one little bit of memory for the global variables.
>
> Does that make any sense??
>
> Regards
>
> Stephen
>
> ------------------------------------------------------------------
> ------------
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fu
sebox or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.