[CalendarServer-changes] [1030]
CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jan 11 16:40:03 PST 2007
Revision: 1030
http://trac.macosforge.org/projects/calendarserver/changeset/1030
Author: wsanchez at apple.com
Date: 2007-01-11 16:40:03 -0800 (Thu, 11 Jan 2007)
Log Message:
-----------
Change cache timeout to 30 minutes.
Get rid of logic to ignore empty results from OD and pretend OD always
works. We'll see if that's true.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py
Modified: CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py 2007-01-11 23:23:42 UTC (rev 1029)
+++ CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py 2007-01-12 00:40:03 UTC (rev 1030)
@@ -37,7 +37,7 @@
from twistedcaldav.directory.directory import DirectoryService, DirectoryRecord
from twistedcaldav.directory.directory import DirectoryError, UnknownRecordTypeError
-recordListCacheTimeout = 60 * 5 # 5 minutes
+recordListCacheTimeout = 60 * 30 # 30 minutes
class OpenDirectoryService(DirectoryService):
"""
@@ -151,18 +151,12 @@
memberGUIDs = memberGUIDs,
)
- if records:
- self._records[recordType] = records
+ self._records[recordType] = records
+ def flush():
+ log.msg("Flushing %s record cache" % (recordType,))
+ del self._records[recordType]
+ reactor.callLater(recordListCacheTimeout, flush)
- def flush():
- log.msg("Flushing %s record cache" % (recordType,))
- del self._records[recordType]
- reactor.callLater(recordListCacheTimeout, flush)
- else:
- # records is empty. This may mean the directory went down.
- # Don't cache this result, so that we keep checking the directory.
- return records
-
return self._records[recordType]
def listRecords(self, recordType):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070111/1017ffa1/attachment.html
More information about the calendarserver-changes
mailing list