[#BloombergLP-bdlcc-Cache_TestUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::Cache_TestUtil :relfileprefix: ../../ :mrdocs: This class implements a test utility that gives the test driver access to the lock / unlock method of the RW mutex. Its purpose is to allow testing that the locking actually happens as planned. == Synopsis Declared in `<bdlcc_cache.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class VALUE, class HASH = xref:bsl/hash-06.adoc[bsl::hash<KEY>], class EQUAL = xref:bsl/equal_to-0d.adoc[bsl::equal_to<KEY>]> class Cache_TestUtil; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/Cache_TestUtil/2constructor.adoc[`Cache_TestUtil`] [.small]#[constructor]# | Create a `Cache_TestUtil` object to test locking in the specified `cache`. | xref:BloombergLP/bdlcc/Cache_TestUtil/lockRead.adoc[`lockRead`] | Call the `lockRead` method of `bdlcc::Cache` `d_rwlock` lock. | xref:BloombergLP/bdlcc/Cache_TestUtil/lockWrite.adoc[`lockWrite`] | Call the `lockWrite` method of `bdlcc::Cache` `d_rwlock` lock. | xref:BloombergLP/bdlcc/Cache_TestUtil/unlock.adoc[`unlock`] | Call the `unlock` method of `bdlcc::Cache` `d_rwlock` lock. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#