[CalendarServer-dev] Invalidated resources with memcache implementation

Eli Bach ebach2 at gmail.com
Fri May 15 18:07:16 PDT 2009


On May 15, 2009, at 3:29 PM, Wilfredo Sánchez Vega wrote:

>  The caches should time out such that eventually the new email  
> address is recognized, but there will be some time when the server  
> has stale data.
>
>  There is no way to get notified by OD that a record changed, so the  
> only other option is not to cache the data.
>
>  If an hour later (I think the cache timeout is 30 minute), you  
> still can't use that email address, we probably have a bug.
>
> 	-wsv
>
>
> On May 6, 2009, at 12:48 PM, Eli Bach wrote:
>
>> When using open directory configure users/groups/locations/ 
>> resources, with the new memcached caching implementation, what is  
>> the best way to handle the situation where
>>
>> -a user tries to invite a specific user email address in iCal, but  
>> the user isn't present is OD
>> -so DCS adds that email address to the cache as being invalid
>> -the user adds the user to OD
>> -the user goes back to iCal to re-invite the user
>>
>> At this point, DCS seems to only use the cache entry, which still  
>> indicates the address is invalid.
>>
>> What should be done at this point?
>>
>> I've got a separate process that helps manage changes to the  
>> server, so I could send a signal to DCS or possibly to the  
>> memcached process, but what is the best way to handle this?  Of  
>> course, the trivial, but extremely heavyweight option is to restart  
>> DCS.

Is there a better way to do this, other than to tell the user to wait  
30 minutes?

There's:

1) restart the whole DCS server
2) get the memcached to empty itself of all cached entries
3) get the memcached to empty itself of just the cached entries  
related to modified entries (either added, removed or modified)

I'll probably look at doing 2, as doing 3 requires matching exactly  
how DCS caches each bit of data, as well as need both the original and  
the updated values for all the entries that DCS uses to handle it  
properly.

Eli



More information about the calendarserver-dev mailing list