[#BloombergLP-baltzo-ZoneinfoCache] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::ZoneinfoCache :relfileprefix: ../../ :mrdocs: This class provides an efficient mechanism for retrieving information about a given time zone. The first time a client requests information for some time‐zone identifier, that information is loaded (using the `Loader` supplied at construction), returned to the client (via a `const` pointer value), and cached for future use. Subsequent requests for the same time‐zone return the cached information. The returned values are valid for the lifetime of this object. == Synopsis Declared in `<baltzo_zoneinfocache.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class ZoneinfoCache; ---- == Description This class: * is _exception‐neutral_ * is _fully_ _thread‐safe_ For terminology see `bsldoc_glossary`. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/baltzo/ZoneinfoCache/allocator_type.adoc[`allocator_type`] | Allocator type used by this class. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/baltzo/ZoneinfoCache/2constructor.adoc[`ZoneinfoCache`] [.small]#[constructor]# | Create an empty cache of time‐zone information that will use the specified `loader` to populate the cache, as‐needed, with time zone information. Optionally specify an `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory; otherwise, the default allocator is used. In order the populate the cache for a time zone identifier, `loader` must return a `Zoneinfo` object that is well‐formed (see `ZoneinfoUtil::isWellFormed`) and whose `identifier` matches the supplied time zone identifier. | xref:BloombergLP/baltzo/ZoneinfoCache/2destructor.adoc[`~ZoneinfoCache`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/baltzo/ZoneinfoCache/getZoneinfo-0c.adoc[`getZoneinfo`] | `getZoneinfo` overloads | xref:BloombergLP/baltzo/ZoneinfoCache/get_allocator.adoc[`get_allocator`] | Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used. | xref:BloombergLP/baltzo/ZoneinfoCache/lookupZoneinfo.adoc[`lookupZoneinfo`] | Return the address of the non‐modifiable cached description of the time zone identified by the specified `timeZoneId`, and 0 if information for `timeZoneId` has not previously been cached (by a call to `getZoneinfo`). If the returned address is non‐zero, the Zoneinfo object returned is guaranteed to be well‐formed (i.e., `ZoneinfoUtil::isWellFormed will return `true' if called with the returned value), and remain valid for the lifetime of this object. | xref:BloombergLP/baltzo/ZoneinfoCache/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<ZoneinfoCache, UsesBslmaAllocator>`] | Nested trait declaration for `bslma::UsesBslmaAllocator`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#