[CalendarServer-changes] [5438] CalendarServer/branches/users/cdaboo/shared-calendars-5187/ calendarserver/provision

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 7 08:13:47 PDT 2010


Revision: 5438
          http://trac.macosforge.org/projects/calendarserver/changeset/5438
Author:   cdaboo at apple.com
Date:     2010-04-07 08:13:45 -0700 (Wed, 07 Apr 2010)
Log Message:
-----------
Commit temporary PROPFIND cache removal before merge from trunk.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/shared-calendars-5187/calendarserver/provision/root.py
    CalendarServer/branches/users/cdaboo/shared-calendars-5187/calendarserver/provision/test/test_root.py

Modified: CalendarServer/branches/users/cdaboo/shared-calendars-5187/calendarserver/provision/root.py
===================================================================
--- CalendarServer/branches/users/cdaboo/shared-calendars-5187/calendarserver/provision/root.py	2010-04-07 03:26:30 UTC (rev 5437)
+++ CalendarServer/branches/users/cdaboo/shared-calendars-5187/calendarserver/provision/root.py	2010-04-07 15:13:45 UTC (rev 5438)
@@ -260,30 +260,30 @@
                     request.extendedLogItems = {}
                 request.extendedLogItems["xff"] = remote_ip[0]
 
-        if request.method == "PROPFIND" and not getattr(request, "notInCache", False) and len(segments) > 1:
-            try:
-                authnUser, authzUser = (yield self.authenticate(request))
-                request.authnUser = authnUser
-                request.authzUser = authzUser
-            except (UnauthorizedLogin, LoginFailed):
-                response = (yield UnauthorizedResponse.makeResponse(
-                    request.credentialFactories,
-                    request.remoteAddr
-                ))
-                raise HTTPError(response)
+#        if request.method == "PROPFIND" and not getattr(request, "notInCache", False) and len(segments) > 1:
+#            try:
+#                authnUser, authzUser = (yield self.authenticate(request))
+#                request.authnUser = authnUser
+#                request.authzUser = authzUser
+#            except (UnauthorizedLogin, LoginFailed):
+#                response = (yield UnauthorizedResponse.makeResponse(
+#                    request.credentialFactories,
+#                    request.remoteAddr
+#                ))
+#                raise HTTPError(response)
+#
+#            try:
+#                if not getattr(request, "checkingCache", False):
+#                    request.checkingCache = True
+#                    response = (yield self.responseCache.getResponseForRequest(request))
+#                    if response is None:
+#                        request.notInCache = True
+#                        raise KeyError("Not found in cache.")
+#        
+#                    returnValue((_CachedResponseResource(response), []))
+#            except KeyError:
+#                pass
 
-            try:
-                if not getattr(request, "checkingCache", False):
-                    request.checkingCache = True
-                    response = (yield self.responseCache.getResponseForRequest(request))
-                    if response is None:
-                        request.notInCache = True
-                        raise KeyError("Not found in cache.")
-        
-                    returnValue((_CachedResponseResource(response), []))
-            except KeyError:
-                pass
-
         child = (yield super(RootResource, self).locateChild(request, segments))
         returnValue(child)
 

Modified: CalendarServer/branches/users/cdaboo/shared-calendars-5187/calendarserver/provision/test/test_root.py
===================================================================
--- CalendarServer/branches/users/cdaboo/shared-calendars-5187/calendarserver/provision/test/test_root.py	2010-04-07 03:26:30 UTC (rev 5437)
+++ CalendarServer/branches/users/cdaboo/shared-calendars-5187/calendarserver/provision/test/test_root.py	2010-04-07 15:13:45 UTC (rev 5438)
@@ -363,7 +363,7 @@
         def gotResponse2(response):
             if response.code != responsecode.MULTI_STATUS:
                 self.fail("Incorrect response for PROPFIND /principals/: %s" % (response.code,))
-            self.assertEqual(self.root.resource.responseCache.cacheHitCount, 1)
+            self.assertEqual(self.root.resource.responseCache.cacheHitCount, 0)
 
         d = self.send(request, gotResponse1)
         return d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100407/4af8a965/attachment.html>


More information about the calendarserver-changes mailing list