The important thing to realise is how long each of these scopes last, and where they can be seen.
Server scope is available to every page on the server, regardless of application name specified. Their timeout is defined in your Cf administrator, and typically last for a few days. Put things in here that are relevant to every application application and not to specific applications or users. This scope is empty for the first user of the server, or if no one has visited the server for the specified timeout period. Application scope is available to every page that shares the same application name in your cfapplication tag. Their timeout is defined in your Cf administrator, and typically last for a few days. Put things in here that are relevant to the entire application and not to specific users. This scope is empty for the first user of the application, or if no one has visited the application for the specified timeout period. Session scope is available to every page that one user calls in their session within one app. Their timeout is defined in your Cf administrator, and typically last for a few hours, or when the user's session timesout. Put things in here that are relevant to the user's session and not to just one page. This scope is empty for the each user when they start a new session, or if they allow their session to timeout. Request scope is available to every part of a single page request. This scope is created when a page load is started and is lost when the page finishes loading. Put things in here that are relevant to just this page, where you want something to be available to several sections of the same page. This scope is empty at the beginning of each and every page, and is cleared at the end of each and every page. Its important to remember to check for whether these variables have timed out or not, for all cases except for request. Generally, I'd set a bunch of them in a logical group, high up in the Application.cfm (or similar) and surround them with a condition that tests for the existance (isdefined) of one of the variables in the group (because if one timesout, they'll all timeout). That way they only get set if they don't exist, but they will always be set if the don't exist. And as Andrew was saying, back in the day, I'd have great herds of values in the Application scope and then move them at the beginning of every page into the request scope, so that I only had to lock the application scope when this copy was done. In these enlightened days, this is not necessary (under normal conditions). Hope that helps. Darren Tracey CFUG QLD Manager Australia On Apr 23, 6:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi all, > > I was wondering what the differences between the request and > application variables are. > > I use the application variable to store the variables that dont change > much (dsn, page info, page content etc...). > > Now i dont seem to understand the request scope and its uses well > enough to use them. > > Can anyone shed some light on this topic for me. > > i have read some articles on the net, but they dont seem to explain > the concept well enough. > > Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---