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

Remove the item having the specified `key` from this cache&period; Invoke the post&hyphen;eviction callback for the removed item&period; Return 0 on success and 1 if `key` does not exist&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
erase(KEY const& key);
----


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