[CalendarServer-changes] [465] CalendarServer/trunk/twistedcaldav/resource.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 14 21:41:05 PST 2006


Revision: 465
          http://trac.macosforge.org/projects/calendarserver/changeset/465
Author:   cdaboo at apple.com
Date:     2006-11-14 21:41:04 -0800 (Tue, 14 Nov 2006)

Log Message:
-----------
Fix principal/cu-address lookup. We need to force the principal collection to be cached in the request's URL map.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/resource.py

Modified: CalendarServer/trunk/twistedcaldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/resource.py	2006-11-15 05:03:22 UTC (rev 464)
+++ CalendarServer/trunk/twistedcaldav/resource.py	2006-11-15 05:41:04 UTC (rev 465)
@@ -576,7 +576,11 @@
     """
     for url in CalendarPrincipalCollectionResource.principleCollectionSet.keys():
         try:
-            pcollection = CalendarPrincipalCollectionResource.principleCollectionSet[url]
+            # Explicitly locate the prinicpal collection resource to force URL caching in request
+            pcollection = waitForDeferred(request.locateResource(url))
+            yield pcollection
+            pcollection = pcollection.getResult()
+
             if isinstance(pcollection, CalendarPrincipalCollectionResource):
                 principal = waitForDeferred(pcollection.findCalendarUser(request, address))
                 yield principal

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061114/547146a8/attachment.html


More information about the calendarserver-changes mailing list