[#BloombergLP-baltzo-ZoneinfoCache]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::ZoneinfoCache
:relfileprefix: ../../
:mrdocs:

This class provides a cache for time&hyphen;zone information&period;

== Synopsis

Declared in `&lt;baltzo&lowbar;zoneinfocache&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ZoneinfoCache;
----

== Description

This class provides an efficient mechanism for retrieving information about a given time zone&period; The first time a client requests information for some time&hyphen;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&period; Subsequent requests for the same time&hyphen;zone return the cached information&period; The returned values are valid for the lifetime of this object&period;

This class&colon; &ast; is _exception&hyphen;neutral_ &ast; is _fully_ _thread&hyphen;safe_ For terminology see `bsldoc&lowbar;glossary`&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/ZoneinfoCache/allocator_type.adoc[`allocator&lowbar;type`] 
| Allocator type used by this class&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/ZoneinfoCache/2constructor.adoc[`ZoneinfoCache`]         [.small]#[constructor]#
| Create an empty cache of time&hyphen;zone information&period;
| xref:BloombergLP/baltzo/ZoneinfoCache/2destructor.adoc[`&#126;ZoneinfoCache`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/baltzo/ZoneinfoCache/getZoneinfo-0c.adoc[`getZoneinfo`] 
| Return the address of the `Zoneinfo` for `timeZoneId`, or 0 on failure&period;
| xref:BloombergLP/baltzo/ZoneinfoCache/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used by this object to supply memory&period;
| xref:BloombergLP/baltzo/ZoneinfoCache/lookupZoneinfo.adoc[`lookupZoneinfo`] 
| Return the address of the cached Zoneinfo for `timeZoneId`, or 0&period;
| xref:BloombergLP/baltzo/ZoneinfoCache/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;ZoneinfoCache, UsesBslmaAllocator&gt;`] 
| Nested trait declaration for `bslma&colon;&colon;UsesBslmaAllocator`&period;
|===



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