CFLOCK and Persistent Components
Posted on 2003-03-06
I am working on a new CFMX coding strategy. In order to put less strain on SQL Server 2000, i'm writing some components that essentially manage a section of my database, such as a Product component. These components would be loaded into the Server or Application scope, and would keep queries loaded. In this way, I won't have to hit the product database table everytime, I just have to call Server.ProductManager.getAllProducts() or whatever. My question: what sort of concerns does this situation raise in regards to CFLOCK. When I'm writing the query, do I have to lock it? When I'm reading? What if I do an INSERT or UPDATE and the re-load the query. Does that need a lock? If so, what level of locking do I need? Please note that this is CFMX i'm referring to, which seems to be a bit friendlier w/ locking.