[CalendarServer-changes] [3982] CalendarServer/branches/users/wsanchez/mo-cache/twistedcaldav/static .py
source_changes at macosforge.org
source_changes at macosforge.org
Sat Apr 11 12:02:50 PDT 2009
Revision: 3982
http://trac.macosforge.org/projects/calendarserver/changeset/3982
Author: wsanchez at apple.com
Date: 2009-04-11 12:02:50 -0700 (Sat, 11 Apr 2009)
Log Message:
-----------
We want CachingPropertyStore for other CalDAVFiles
Modified Paths:
--------------
CalendarServer/branches/users/wsanchez/mo-cache/twistedcaldav/static.py
Modified: CalendarServer/branches/users/wsanchez/mo-cache/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/wsanchez/mo-cache/twistedcaldav/static.py 2009-04-11 18:03:42 UTC (rev 3981)
+++ CalendarServer/branches/users/wsanchez/mo-cache/twistedcaldav/static.py 2009-04-11 19:02:50 UTC (rev 3982)
@@ -141,7 +141,19 @@
return super(CalDAVFile, self).checkPreconditions(request)
+ def deadProperties(self, caching=True):
+ if not hasattr(self, "_dead_properties"):
+ # Get the property store from super
+ deadProperties = super(CalDAVFile, self).deadProperties()
+ if caching:
+ # Wrap the property store in a memory store
+ deadProperties = CachingPropertyStore(deadProperties)
+
+ self._dead_properties = deadProperties
+
+ return self._dead_properties
+
##
# CalDAV
##
@@ -385,7 +397,10 @@
def deadProperties():
if not hasattr(similar, "_dead_properties"):
- similar._dead_properties = self.propertyCollection().propertyStoreForChild(similar, superDeadProperties())
+ similar._dead_properties = self.propertyCollection().propertyStoreForChild(
+ similar,
+ superDeadProperties(caching=False)
+ )
return similar._dead_properties
similar.deadProperties = deadProperties
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090411/5464fb08/attachment.html>
More information about the calendarserver-changes
mailing list