#include <userver/testsuite/cache_control.hpp>
Testsuite interface for caches and cache-like components.
If a component stores transient state that may be carried between tests, or stores caches that may become stale, then it should register its resetter here. Example:
Testsuite will then call this hook in the beginning of each test. You can also reset a specific cache in testsuite explicitly as follows:
CacheControl is normally acquired through testsuite::FindCacheControl.
All methods are coro-safe.
Definition at line 54 of file cache_control.hpp.
Public Member Functions | |
void | ResetAllCaches (cache::UpdateType update_type, const std::unordered_set< std::string > &force_incremental_names, const std::unordered_set< std::string > &exclude_names) |
Reset all the registered caches. | |
void | ResetCaches (cache::UpdateType update_type, std::unordered_set< std::string > reset_only_names, const std::unordered_set< std::string > &force_incremental_names) |
Reset caches with the specified names. | |
CacheControl (CacheControl &&)=delete | |
CacheControl & | operator= (CacheControl &&)=delete |
void testsuite::CacheControl::ResetAllCaches | ( | cache::UpdateType | update_type, |
const std::unordered_set< std::string > & | force_incremental_names, | ||
const std::unordered_set< std::string > & | exclude_names ) |
Reset all the registered caches.
update_type is used by caches derived from component::CachingComponentBase.
void testsuite::CacheControl::ResetCaches | ( | cache::UpdateType | update_type, |
std::unordered_set< std::string > | reset_only_names, | ||
const std::unordered_set< std::string > & | force_incremental_names ) |
Reset caches with the specified names.
update_type is used by caches derived from component::CachingComponentBase.
|
friend |
Definition at line 105 of file cache_control.hpp.