Hi once again. I'm about to start going back (grrrr) and locking all 
my session, application variables, etc properly. Got a couple 
question.

1. Suppose I'm creations a session variable FROM session variables. 
For instance:

I have: session.subtotal, session.tax, and session.shipping. I want 
to create a total:

<cfset session.total = session.subtotal + session.tax + session.shipping>

What kind of lock would go around that? Or would it be best to set a 
local variable inside a Readonly lock then set the session.total 
inside an exclusive lock from the local variable.

<cflock timeout="30" type="readonly" scope="session">
<cfset total = session.subtotal + session.tax + session.shipping>
</cflock>

<cflock timeout="30" type="exclusive" scope="session">
<cfset session.total = total>
</cflock>

2. I've got a million instances of passing cfid and cftoken as 
session.id if cookies are turned off as per Ben Forta's examples in 
his book.

a href = "somepage.cfm?#session.id#"

That means I need to put a readonly lock around all of those, 
correct? My question is (actually a two part question).

If I have a block of these, such as a text menu, should I put one 
lock around the entire block? Or should I lock each link separately?

Part B of this question: Since I'm going through the hassle of 
checking for the existence of cookies, AND passing the session.id, 
would it be better to just pass 
cfid=#client.cfid#&cftoken=#client.cftoken# and not worry about if 
cookies are turned on? I suppose even if I do that, I should put a 
readonly lock around the links anyway, huh?

Geesh. Sorry for being so long-winded. :)
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to