[CalendarServer-changes] [2933] CalendarServer/trunk/twistedcaldav/cache.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 3 07:10:41 PDT 2008


Revision: 2933
          http://trac.macosforge.org/projects/calendarserver/changeset/2933
Author:   cdaboo at apple.com
Date:     2008-09-03 07:10:38 -0700 (Wed, 03 Sep 2008)
Log Message:
-----------
Clean-up + fix for unit test.

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

Modified: CalendarServer/trunk/twistedcaldav/cache.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/cache.py	2008-09-03 13:48:13 UTC (rev 2932)
+++ CalendarServer/trunk/twistedcaldav/cache.py	2008-09-03 14:10:38 UTC (rev 2933)
@@ -14,23 +14,22 @@
 # limitations under the License.
 ##
 
-import uuid
-import hashlib
 import cPickle
+import hashlib
+import uuid
 
 from zope.interface import implements
 
 from twisted.internet.defer import succeed, maybeDeferred
 
-from twisted.web2.iweb import IResource
 from twisted.web2.dav.util import allDataFromStream
 from twisted.web2.http import Response
+from twisted.web2.iweb import IResource
 from twisted.web2.stream import MemoryStream
 
+from twistedcaldav.config import config
 from twistedcaldav.log import LoggingMixIn
 from twistedcaldav.memcachepool import CachePoolUserMixIn
-from twistedcaldav.config import config
-
 from twistedcaldav.notify import NotificationClientUserMixIn
 
 
@@ -38,12 +37,16 @@
     def __init__(self, *args, **kwargs):
         pass
 
+    def enableNotify(self, arg):
+        pass
 
+    def disableNotify(self):
+        pass
+
     def changed(self):
         return succeed(None)
 
 
-
 class DisabledCache(object):
     def getResponseForRequest(self, request):
         return succeed(None)
@@ -52,7 +55,6 @@
         return succeed(response)
 
 
-
 class URINotFoundException(Exception):
     def __init__(self, uri):
         self.uri = uri
@@ -64,7 +66,6 @@
             self.uri)
 
 
-
 #
 # FIXME: This should be a generic notifier class, not specific to
 # memcache, as evidenced by the addition of the sendNotification()
@@ -113,7 +114,6 @@
             self._newCacheToken())
 
 
-
 class BaseResponseCache(LoggingMixIn):
     """
     A base class which provides some common operations
@@ -188,7 +188,6 @@
         return d1
 
 
-
 class MemcacheResponseCache(BaseResponseCache, CachePoolUserMixIn):
     def __init__(self, docroot, cachePool=None):
         self._docroot = docroot
@@ -320,7 +319,6 @@
                 lambda _: response)
 
         def _cacheResponse((key, responseBody)):
-            principalURI = self._principalURI(request.authnUser)
 
             response.headers.removeHeader('date')
             response.stream = MemoryStream(responseBody)
@@ -345,7 +343,6 @@
         return d
 
 
-
 class _CachedResponseResource(object):
     implements(IResource)
 
@@ -359,7 +356,6 @@
         return self, []
 
 
-
 class PropfindCacheMixin(object):
     def renderHTTP(self, request):
         def _cacheResponse(responseCache, response):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080903/088e8e34/attachment.html 


More information about the calendarserver-changes mailing list