Copy link to clipboard
Copied
I am using seesion variable in my login function.
Basically once I login i store the login id in session variable and pass in my query to get the data.
Do I have to use cflock with session varible.
currently I am not using cflock with session variable. Does it gona slow down or will lock the db.
If i don't use session what alternative should i use?
I mean client variable.
Thanks in advance.
Copy link to clipboard
Copied
See my answer in your other thread
Copy link to clipboard
Copied
<cflock> is not the same as a database lock. Databases are not aware of it.
This tag operates on what is called a named semaphore. It serializes activities within the ColdFusion server(s) only. All threads, on all servers that may exist, can see the current list of names that are locked. Threads which attempt to lock a particular name are serialized with all others which are simultaneously referring-to the same name.
This tag is required for use in reference to the Session variable-pool. If you are using any other type of shared memory object you must also use it. You can also use it for application-specific purposes. The "cost" is negligible.