Well, I don't fully understand where you're at applicationwise, but I try to use a cached query for most of my application-wide settings. Keeps the locks and copies to request scope down to near zero. The few values that need to tunnel down to custom tags (a couple of base url and file path settings) get converted to request scope in application.cfm.
I don't usually reset these values manually. I tend to go for short caches of about 10 seconds. If my server can't handle a db read once every 10 seconds I have bigger problems :D. Still, I hacked up a cfif to allow a manual reset below. This probably has no bearing on your needs... Just a little daffy after a weekend of solid coding and looking for a distraction. Egads... Escape from coding by hanging out on CF-Talk. Am I a geek or what? -------------------------------------------- Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc. http://mysecretbase.com -------------------------------------------- <cfif url.reset is not "kaboom"> <cfset request.SetMins=10> <cfset request.SetSecs=0> <cfelse> <cfset request.SetMins=0> <cfset request.SetSecs=1> </cfif> <cfset variables.mySettings="Foo"> <cfquery name="SystemDefaults" datasource="#request.SiteDSN#" maxrows="1" cachedwithin="#CreateTimeSpan(0,0,request.SetMins,request.SetSecs)#"> SELECT settings.myPath, settings.myBaseURL, settings.blahblahblah FROM settings WHERE 0=0 </cfquery> <cfset request.BasePath=SystemDefaults.myPath> <cfset request.BaseURL=SystemDefaults.myBaseURL> -----Original Message----- From: Dina Hess [mailto:[EMAIL PROTECTED] Sent: Sunday, July 13, 2003 12:49 PM To: CF-Talk Subject: Re: Refresh application-scoped variables No intrusion. I assume you mean why would I refresh the application scope by using a link in the admin area? Because I'm too stupid to figure out a better way? :) I indeed thought I was saving overhead by not resetting the same application-scoped variables for every request...since they don't change often. ----- Original Message ----- From: "Matt Robertson" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Sunday, July 13, 2003 2:30 PM Subject: RE: Refresh application-scoped variables > Pardon the intrusion, but why would you refresh the application scope > like this? Saving overhead rather than using cfparam in > application.cfm? > > -------------------------------------------- > Matt Robertson [EMAIL PROTECTED] > MSB Designs, Inc. http://mysecretbase.com > -------------------------------------------- > > > > -----Original Message----- > From: Dina Hess [mailto:[EMAIL PROTECTED] > Sent: Sunday, July 13, 2003 12:23 PM > To: CF-Talk > Subject: Re: Refresh application-scoped variables > > > So you have a "refresh application scope" link in an admin area to set > url.reset? Sounds like what I'm doing now. I just wondered if there was > a > better to do it. > > Thanks for the input, Mike. > > > ----- Original Message ----- > From: "Mike Townend" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Sunday, July 13, 2003 1:02 PM > Subject: RE: Refresh application-scoped variables > > > > I usually do something like.. > > > > <CFIF Not IsDefined("Application.DSN") OR IsDefined("URL.Reset")> > > <!--- Create all Application Vars ---> > > </CFIF> > > > > So if I need to reset an app then just call the page and append a > ?reset=1 > > > > HTH > > > > > > > > -----Original Message----- > > From: Dina Hess [mailto:[EMAIL PROTECTED] > > Sent: Sunday, July 13, 2003 18:45 > > To: CF-Talk > > Subject: Refresh application-scoped variables > > > > > > Hi all, > > > > Can't seem to get my head around this one... How can I > programmatically > > refresh application-scoped variables whenever there's a change? > > > > Right now, I'm doing something like this in Application.cfm: > > > > <cfparam name="application.init" default="0"> > > > > <cfif not application.init> > > use cfsavecontent to create application-scoped variables > > set application.init to 1 > > </cfif> > > > > What I want is some way to automatically reset application.init to 0 > > whenever these variables are modified. > > Can someone point me in the right direction? Resources? > > > > Thanks, > > ~Dina > > http://www.dinahess.com/ > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4