[#BloombergLP-bdlcc-Cache-tryGetValue]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/Cache.adoc[Cache]::tryGetValue
:relfileprefix: ../../../
:mrdocs:

Load, into the specified `value`, the value associated with the specified `key` in this cache&period; If the optionally specified `modifyEvictionQueue` is `true` and the eviction policy is LRU, then move the cached item to the back of the eviction queue&period; Return 0 on success, and 1 if `key` does not exist in this cache&period; Note that a write lock is acquired only if this queue is modified&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;cache&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
tryGetValue(
    xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;VALUE&gt;]* value,
    KEY const& key,
    bool modifyEvictionQueue = true);
----


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