1414#include < userver/cache/exceptions.hpp>
1515#include < userver/compiler/demangle.hpp>
1616#include < userver/components/component_base.hpp>
17+ #include < userver/components/component_context.hpp>
1718#include < userver/components/component_fwd.hpp>
1819#include < userver/concurrent/async_event_channel.hpp>
1920#include < userver/dump/helpers.hpp>
@@ -36,9 +37,7 @@ namespace components {
3637// / @brief Base class for caching components
3738// /
3839// / Provides facilities for creating periodically updated caches.
39- // / You need to override cache::CacheUpdateTrait::Update
40- // / then call cache::CacheUpdateTrait::StartPeriodicUpdates after setup
41- // / and cache::CacheUpdateTrait::StopPeriodicUpdates before teardown.
40+ // / You need to override cache::CacheUpdateTrait::Update.
4241// / You can also override cache::CachingComponentBase::PreAssignCheck and set
4342// / has-pre-assign-check: true in the static config to enable check.
4443// /
@@ -208,8 +207,6 @@ class CachingComponentBase : public ComponentBase, public cache::DataProvider<T>
208207 virtual void PreAssignCheck (const T* old_value_ptr, const T* new_value_ptr) const ;
209208
210209private:
211- void OnAllComponentsLoaded () final ;
212-
213210 void Cleanup () final ;
214211
215212 void MarkAsExpired () final ;
@@ -237,9 +234,7 @@ CachingComponentBase<T>::CachingComponentBase(const ComponentConfig& config, con
237234 }
238235 }
239236 )
240- {
241- const auto initial_config = GetConfig ();
242- }
237+ {}
243238
244239template <typename T>
245240CachingComponentBase<T>::~CachingComponentBase () {
@@ -356,11 +351,6 @@ std::unique_ptr<const T> CachingComponentBase<T>::ReadContents(dump::Reader& rea
356351 }
357352}
358353
359- template <typename T>
360- void CachingComponentBase<T>::OnAllComponentsLoaded() {
361- AssertPeriodicUpdateStarted ();
362- }
363-
364354template <typename T>
365355void CachingComponentBase<T>::Cleanup() {
366356 cache_.Cleanup ();
0 commit comments