Create a calendar cache with the specified loader and timeout.
Declared in <bdlt_calendarcache.h>
CalendarCache(
CalendarLoader* loader,
bsls::TimeInterval const& timeout,
bslma::Allocator* basicAllocator = 0);
Create an empty calendar cache that uses the specified loader to load calendars on demand and has the specified timeout interval indicating the length of time that calendars remain valid for subsequent retrieval from the cache after they have been loaded. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined unless bsls::TimeInterval() <= timeout <= bsls::TimeInterval(INT_MAX, 0), and loader remains valid throughout the lifetime of this cache. Note that a timeout value of 0 indicates that a calendar will be loaded into the cache by each (successful) call to the getCalendar method.
| Name | Description |
|---|---|
| loader | calendar loader used on demand |
| timeout | interval after which cached calendars expire |
| basicAllocator | allocator used to supply memory |