Wouldn't that defeat the purpose of the lock then? As Sean pointed out,
you'd only be protecting that file access for that one user.

Using the MD5 of the filename is a pretty solid solution in this case as
that would only protect that file and would protect it from any other user
also accessing that file. If the technique is used consistently across apps,
it would also protect that resource regardless of app. Which seems to be a
good thing.

- Calvin

-----Original Message-----
From: Matt Robertson [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 31, 2005 8:03 PM
To: CF-Talk
Subject: Re: proper locking techniques : Access

Jochem wrote:
> I like the idea of using named locks whenever I use cffile. But
> since I use the MD5 of the filename as the lock name that
> shouldn't conflict very often :-)

ah clever.  Salt the hash with the user id and they'll never conflict,
assuming that doesn't screw something else up  :D

-- 
--mattRobertson--
Janitor, MSB Web Systems
mysecretbase.com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192528
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to