When should I use Scope Locking (Application, Server, etc…) vs named locking in ColdFusion?
问题 When is it appropriate to use <cflock scope="application"> or it's ilk as opposed to <cflock name="foo">? Specifically, I'm interested in using CFLock to protect shared objects in the application, session, or server scopes, but I'm also interested in finding out about different uses of locking in ColdFusion. 回答1: You should use when reading and writing from things that can change in the application scope. For example: <cfquery name="application.myData"> select * from myTable </cfquery> You