[asterisk-dev] Calendaring API

Daniel Hazelbaker daniel at highdesertchurch.com
Wed Oct 8 11:19:49 CDT 2008

On Oct 8, 2008, at 12:52 AM, John Todd wrote:

> To top-summarize:
> I was thinking a bit about the caching issue.  Perhaps there is a way
> to temporarily cache and refresh unnamed calendars automatically?  In
> the [general] section of calendars.conf, there might be something
> like this:

I am not up on CalDAV, but as I understand it it is just built on top  
of HTTP.  Wouldn't it be possible to use the same methods that web  
browsers use to determine if a web page has changed since the last  
time it was retrieved and parsed?  If it hasn't changed we use the in- 
memory cache, if it has then we retrieve it again.  I would still have  
a "forcecached" option to make a calendar be cached no matter what for  
x period of time if desired.  Most calendars don't get updated all  
that often, others (especially depending on client) might get updated  
all the time even if nothing actually changes.


> [general]
> ;
> ; Do we cache un-named calendars that are referenced in the dialplan?
> ;  This makes subsequent responses faster, which is important during
> ;  call processing, and also lowers network lag for full calendar
> ;  imports.
> ;
> cacheunnamed=yes
> ;
> ; How long do we maintain state for an un-named calendar?  (seconds)
> ;  If the calendar is unused, and this timer expires, the calendar
> ;  is "forgotten" until next requested.  However, if the calendar is
> ;  queried, the counter is reset to zero and starts again.
> ;
> cacheduration=86400
> ;
> ; Un-named calendars are refreshed this often (seconds) for the  
> duration
> ;  that they live in the cache.  This keeps them "useful" to  
> subsequent
> ;  queries without having to pause to re-load the entire calendar.
> ;  If the calendar is unreachable on a refresh, the data is maintained
> ;  until the cacheduration timer expires.
> ;
> refresh=3600
> ;
> JT

More information about the asterisk-dev mailing list