58class CacheControl
final {
66 const std::unordered_set<std::string>& force_incremental_names,
67 const std::unordered_set<std::string>& exclude_names
81 std::unordered_set<std::string> reset_only_names,
82 const std::unordered_set<std::string>& force_incremental_names
85 CacheControl(CacheControl&&) =
delete;
86 CacheControl& operator=(CacheControl&&) =
delete;
91 explicit UnitTests() =
default;
94 enum class ExecPolicy {
99 CacheControl(impl::PeriodicUpdatesMode, UnitTests);
101 impl::PeriodicUpdatesMode,
104 impl::CacheReverseDependencies reverse_dependencies
109 bool IsPeriodicUpdateEnabled(
const cache::Config& cache_config,
const std::string& cache_name)
const;
116 utils::impl::InternalTag,
117 utils::ResourceScopeStorage& scopes,
118 std::string_view name,
124 struct CacheInfo
final {
127 bool needs_span{
true};
129 struct CacheInfoNode;
130 using CacheInfoIterator = CacheInfoNode*;
132 CacheInfoIterator DoRegisterCache(CacheInfo&& info);
138 const std::unordered_set<std::string>* reset_only_names,
139 const std::unordered_set<std::string>& force_incremental_names,
140 const std::unordered_set<std::string>* exclude_names
143 void DoResetCachesConcurrently(
145 const std::unordered_set<std::string>* reset_only_names,
146 std::unordered_set<std::string>& names_left_to_encounter,
147 const std::unordered_set<std::string>& force_incremental_names,
148 const std::unordered_set<std::string>* exclude_names
151 void UnregisterCache(CacheInfoIterator)
noexcept;
153 static void DoResetSingleCache(
154 const CacheInfo& info,
156 const std::unordered_set<std::string>& force_incremental_names
160 std::unique_ptr<Impl> impl_;