[#BloombergLP-bdlt-CalendarCache-2constructor-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/CalendarCache.adoc[CalendarCache]::CalendarCache :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bdlt_calendarcache.h>` Create an empty calendar cache that uses the specified `loader` to load calendars on demand and has no timeout. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. Calendars loaded into this cache remain valid for retrieval until they have been explicitly invalidated (via either the `invalidate` or `invalidateAll` methods), or until this object is destroyed. The behavior is undefined unless `loader` remains valid throughout the lifetime of this cache. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdlt/CalendarCache/2constructor-05.adoc[CalendarCache]( xref:BloombergLP/bdlt/CalendarLoader.adoc[CalendarLoader]* loader, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlt/CalendarCache/2constructor-05.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlt/CalendarCache/2constructor-07.adoc[CalendarCache]( xref:BloombergLP/bdlt/CalendarLoader.adoc[CalendarLoader]* loader, xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& timeout, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlt/CalendarCache/2constructor-07.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#