[#BloombergLP-bdlcc-Cache-insert-0e] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/Cache.adoc[Cache]::insert :relfileprefix: ../../../ :mrdocs: Insert the specified `key` and its associated `valuePtr` into this cache. If `key` already exists, then its value will be replaced with `value`. Note that the method with `key` moved provides the `basic` but not the `strong` exception guarantee ‐‐ if a throw occurs, the cache will not be modified, but `key` may be changed. Also note that `key` must be copyable, even if it is moved. == Synopsis Declared in `<bdlcc_cache.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void insert( KEY const& key, xref:BloombergLP/bdlcc/Cache/ValuePtrType.adoc[ValuePtrType] const& valuePtr); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#