I think it's already pretty common practice to copy the session
structure to the request scope, which also does not need to be locked.
I don't do it, but then I also don't use many session variables.

- Matt Small

-----Original Message-----
From: Jim Curran [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 19, 2002 10:11 AM
To: CF-Talk
Subject: RE: UDF question

Hey all,

Just a thought off the top of my head,

Premise: Local Vars do not need to be cflocked

Why not

1) copy the session structure to a temporary local structure in
Application.cfm:

        <cflock ...>
                <cfset session_temp = structcopy(session)>
        </cflock>

2) Reference the temp structure in all templates:

        <cfif isdefined("session_temp.blah")>... </cfif>

3) Set the session struct equal to the temp struct in OnRequestEnd.cfm

        <cflock ...>
                <cfset session = structcopy(session_temp)>
        </cflock>

I know this probably wouldn't work in the application scope due to the
execution time for each template: data might be overwritten by multiple
users; but in the session scope, it seems to make sense.

Anyone agree?

- j



______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to