[CalendarServer-changes] [4077] CalendarServer/trunk/twistedcaldav/method/put_common.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Apr 23 19:11:54 PDT 2009


Revision: 4077
          http://trac.macosforge.org/projects/calendarserver/changeset/4077
Author:   cdaboo at apple.com
Date:     2009-04-23 19:11:52 -0700 (Thu, 23 Apr 2009)
Log Message:
-----------
Need to hash the UID as it is an arbitrary string and memcache has limits on what it
will accept.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/method/put_common.py

Modified: CalendarServer/trunk/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_common.py	2009-04-24 01:29:30 UTC (rev 4076)
+++ CalendarServer/trunk/twistedcaldav/method/put_common.py	2009-04-24 02:11:52 UTC (rev 4077)
@@ -20,6 +20,7 @@
 
 __all__ = ["StoreCalendarObjectResource"]
 
+import hashlib
 import os
 import types
 import uuid
@@ -149,7 +150,7 @@
             if internal_request:
                 self.lock = None
             else:
-                self.lock = MemcacheLock("ImplicitUIDLock", uid, timeout=60.0)
+                self.lock = MemcacheLock("ImplicitUIDLock", hashlib.md5(uid).hexdigest(), timeout=60.0)
             self.reserved = False
             self.index = index
             self.uid = uid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090423/5d85edf1/attachment.html>


More information about the calendarserver-changes mailing list