[#BloombergLP-bdlt-TimetableCache-2constructor-07]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/TimetableCache.adoc[TimetableCache]::TimetableCache
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bdlt&lowbar;timetablecache&period;h&gt;`

Create an empty timetable cache that uses the specified `loader` to load timetables on demand and has no timeout&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; Timetables 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&period; The behavior is undefined unless `loader` remains valid throughout the lifetime of this cache&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlt/TimetableCache/2constructor-00.adoc[TimetableCache](
    xref:BloombergLP/bdlt/TimetableLoader.adoc[TimetableLoader]* loader,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlt/TimetableCache/2constructor-00.adoc[_» more&period;&period;&period;_]#

Create an empty timetable cache that uses the specified `loader` to load timetables on demand and has the specified `timeout` interval indicating the length of time that timetables remain valid for subsequent retrieval from the cache after they have been loaded&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `bsls&colon;&colon;TimeInterval() &lt;&equals; timeout &lt;&equals; bsls&colon;&colon;TimeInterval(INT&lowbar;MAX, 0)`, and `loader` remains valid throughout the lifetime of this cache&period; Note that a `timeout` value of 0 indicates that a timetable will be loaded into the cache by _each_ (successful) call to the `getTimetable` method&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlt/TimetableCache/2constructor-0e.adoc[TimetableCache](
    xref:BloombergLP/bdlt/TimetableLoader.adoc[TimetableLoader]* loader,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& timeout,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlt/TimetableCache/2constructor-0e.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
