> -----Original Message-----
> From: Terry Bader [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 11, 2001 2:32 PM
> To: CF-Talk
> Subject: LOCKING
>
>
> ok, question about locking....
>
> let's say I have code like this:
>
> <CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="10">
> <CFIF session.value EQ 0>
> <CFINCLUDE TEMPLATE="somecfml.cfm">
> </CFIF>
> </CFLOCK>
>
> And somecfml.cfm might possible need to write to the session scope.
>
> Now, my question is, does the Lock in the calling cfm page follow
> down into
> the included page?
>
The file somecfml.cfm will get included before the page is processed, so basically
when using an include it is as if you are executing the whole template as one file.
>
> just wondering because with a complex Conditional statement
> checking against
> session variables, though you may be only reading from the session scope
> while running the checks, you might just have to write to the
> session scope
> somewhere inside....
> so if the lock does follow the INCLUDES then I guess the whole thing will
> have to be EXECLUSIVELY locked...
Depending on how much code you are talking about running in the included file, you
might want to set local variables wherever possible that hold the data from session
variables you will be reading from or writing to. Once you have these all set you
could do another lock at the end of your page and write them back to the appropriate
session variables.
- Andy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists