I agree with M@, things that are going to be constant and apply across the board to the entire application I would stick in the Application scope. Why the hell Peter does this in the request scope is beyond reasoning to me.
There is very little need to use the request scope, unless you want a way to make variables global to all functions, templates. I'll throw the session scope at you as well, which you can use for the life of a users session that is not applicable to other users of that application. On 4/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Yeah thanks for that. > > So basically, when would you need to be using the request scope? > > I use the application.cfc so i would have all this in my > onrequeststart(). > > Thanks once again guys, > > On Apr 23, 7:41 pm, "M@ Bourke" <[EMAIL PROTECTED]> > wrote: > > I'd either put it in your application scope or cache ya query. > > if it's going to be available for every user all the time then > application > > shouldn't be a problem > > if the site's busy and ya setting it to request each page request for > each > > user then it would be using a lot of memory although the memory would be > > getting cleaned up it would be continually getting filled up. > > I'm not an expert on the inner workings of the cf server but I'd try the > > application scope and if you don't get any issues with it then for this > case > > just sick with it. > > > > M@ > > > > On 4/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > > > > Well i store them in the application scope because i call some > > > function to fetch page information from the database and i wouldnt > > > want them to load on every page request, I would much rather store > > > them in the app scope and call them from the pages This was > > > implemented to avoid hitting the db all the time for fetch page > > > elements and things like that. > > > > > If i was to place them in the request scope would this mean they would > > > load on every page request? Obs this isnt what i would want. > > > > > On Apr 23, 7:23 pm, "Peter Tilbrook" <[EMAIL PROTECTED]> wrote: > > > > No point. In fact an unnecessary overhead. > > > > > > Once the request is finished they are no longer required. Another > page > > > > request - they are used - then zip. No locking or anything required. > > > > > > Application vars have their place but for - at least how I use them > - > > > like > > > > datasourcenames and such - Request scope is perfectly suitable. Just > > > declare > > > > them in the Application.cfm so they are available to all page > requests. > > > > > > -- > > > > Peter Tilbrook > > > > ColdGen Internet Solutions > > > > President, ACT and Region ColdFusion Users Group > > > > PO Box 2247 > > > > Queanbeyan, NSW, 2620 > > > > AUSTRALIA > > > > > >http://www.coldgen.com/http://www.actcfug.com/ > > > > > > Tel: +61-2-6284-2727 > > > > Mob: +61-0432-897-437 > > > > > > Email: [EMAIL PROTECTED] > > > > MSN Messenger Live: Desktop General > > > > > -- Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 8676 4223 Mobile: 0404 998 273 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---