Hey.. you started it (lol)
-----Original Message-----
From: Terry Ford [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 07, 2005 2:45 PM
To: CF-Talk
Subject: Re: pseudo-memory leak
Well if you're going to go to all the trouble (and performance hit) of
building your own session scope and copying structs and stuff, you might as
well just wave the white flag and let the bots use session management ;)
Terry
>More info....
>
>You can't do this - at least not this way.... You can referenced something
>named "session" in the variables scope (variables.session.blah), but when
>you try to use the order of precedence in your favor to evaluate (<cfdump
>var="#session#"">) you get an empty structure...
>
>Of course you could "setup" the session and copy it to another scope with
>each request.. using it for storage only... in that case you would end up
>with something like this.
>
>
>
><Cfif isDefined('url.botAp')>
>
> <cfapplication name="botApplication" sessionmanagement="no"
>clientmanagement="Yes">
>
> <cfset localcopyofsession .color1 = 'blue'>
> <cfset localcopyofsession .color2 = 'blue'>
>
>
><cfelse>
>
> <cfapplication name="RegularUserApplication" sessionmanagement="yes">
>
> <cfif structKeyExists(session,'user')>
> <cfset variables.localcopyofsession = session> (or
> structcopy or
>duplicate)
> <cfelse>
>
> <cfset session.color1 = 'blue'>
> <cfset session.color2 = 'blue'>
> <cfset variables.localcopyofsession = session>
> </cfif>
>
>
>
>
></cfif>
>
>
>Then, everywhere you currently use "session" you would use
>"localcopyofsession".
>
>This would cause the bots to all share the same session values....
>
>-Mark
>
>
>-----Original Message-----
>From: Mark A Kruger [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, December 07, 2005 3:22 PM
>To: CF-Talk
>Subject: RE: pseudo-memory leak
>
>
>Regarding my "application name" approach - you could then try the following
>in "botapplication"
>
>
>session = structnew();
>
>session.user = 0
>session.id = 0....
>
>..... etc....
>
>It would actually be "variables.session" - but it would allow your code to
>work (assuming you can come up with defaults for all your session vars.)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226494
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54