#include <userver/cache/base_postgres_cache.hpp>
Caching component for PostgreSQL. See Caching Component for PostgreSQL.
Definition at line 379 of file base_postgres_cache.hpp.
Public Types | |
using | PolicyType = PostgreCachePolicy |
using | ValueType = pg_cache::detail::ValueType<PolicyType> |
using | RawValueType = pg_cache::detail::RawValueType<PolicyType> |
using | DataType = pg_cache::detail::DataCacheContainerType<PolicyType> |
using | PolicyCheckerType = pg_cache::detail::PolicyChecker<PostgreCachePolicy> |
using | UpdatedFieldType |
using | BaseType = typename PolicyCheckerType::BaseType |
Public Types inherited from components::CachingComponentBase< T > | |
using | DataType = T |
Public Member Functions | |
PostgreCache (const ComponentConfig &, const ComponentContext &) | |
Public Member Functions inherited from components::CachingComponentBase< T > | |
CachingComponentBase (const ComponentConfig &config, const ComponentContext &) | |
utils::SharedReadablePtr< T > | Get () const |
utils::SharedReadablePtr< T > | GetUnsafe () const |
template<class Class > | |
concurrent::AsyncEventSubscriberScope | UpdateAndListen (Class *obj, std::string name, void(Class::*func)(const std::shared_ptr< const T > &)) |
concurrent::AsyncEventChannel< const std::shared_ptr< const T > & > & | GetEventChannel () |
Public Member Functions inherited from components::LoggableComponentBase | |
LoggableComponentBase (const ComponentConfig &, const ComponentContext &) | |
LoggableComponentBase (LoggableComponentBase &&)=delete | |
LoggableComponentBase (const LoggableComponentBase &)=delete | |
~LoggableComponentBase () override=default | |
ComponentHealth | GetComponentHealth () const override |
void | OnLoadingCancelled () override |
void | OnAllComponentsLoaded () override |
void | OnAllComponentsAreStopping () override |
Static Public Member Functions | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Member Functions inherited from components::CachingComponentBase< T > | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Member Functions inherited from components::LoggableComponentBase | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Attributes | |
static constexpr bool | kIncrementalUpdates |
static constexpr auto | kClusterHostTypeFlags |
static constexpr auto | kName = PolicyType::kName |
Additional Inherited Members | |
Protected Types inherited from cache::CacheUpdateTrait | |
enum class | Flag { kNone = 0 , kNoFirstUpdate = 1 << 0 } |
Periodic update flags. More... | |
Protected Member Functions inherited from components::CachingComponentBase< T > | |
void | Set (std::unique_ptr< const T > value_ptr) |
void | Set (T &&value) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename... Args> | |
void | Emplace (Args &&... args) |
void | Clear () |
Clears the content of the cache by string a default constructed T. | |
virtual void | PreAssignCheck (const T *old_value_ptr, const T *new_value_ptr) const |
If the option has-pre-assign-check is set true in static config, this function is called before assigning the new value to the cache. | |
virtual void | WriteContents (dump::Writer &writer, const T &contents) const |
virtual std::unique_ptr< const T > | ReadContents (dump::Reader &reader) const |
Protected Member Functions inherited from cache::CacheUpdateTrait | |
AllowedUpdateTypes | GetAllowedUpdateTypes () const |
Update types configured for the cache. | |
void | StartPeriodicUpdates (utils::Flags< Flag > flags={}) |
Starts periodic updates. | |
void | StopPeriodicUpdates () |
Stops periodic updates. | |
void | AssertPeriodicUpdateStarted () |
void | OnCacheModified () |
CacheUpdateTrait (CacheUpdateTrait &&)=delete | |
CacheUpdateTrait & | operator= (CacheUpdateTrait &&)=delete |
void | InvalidateAsync (UpdateType update_type) |
Non-blocking forced cache update of specified type. | |
void | UpdateSyncDebug (UpdateType update_type) |
Forces a cache update of specified type. | |
const std::string & | Name () const |
using components::PostgreCache< PostgreCachePolicy >::BaseType = typename PolicyCheckerType::BaseType |
Definition at line 390 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::DataType = pg_cache::detail::DataCacheContainerType<PolicyType> |
Definition at line 386 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::PolicyCheckerType = pg_cache::detail::PolicyChecker<PostgreCachePolicy> |
Definition at line 387 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::PolicyType = PostgreCachePolicy |
Definition at line 383 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::RawValueType = pg_cache::detail::RawValueType<PolicyType> |
Definition at line 385 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::UpdatedFieldType |
Definition at line 388 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::ValueType = pg_cache::detail::ValueType<PolicyType> |
Definition at line 384 of file base_postgres_cache.hpp.
components::PostgreCache< PostgreCachePolicy >::PostgreCache | ( | const ComponentConfig & | config, |
const ComponentContext & | context ) |
Definition at line 442 of file base_postgres_cache.hpp.
|
override |
Definition at line 494 of file base_postgres_cache.hpp.
|
static |
Definition at line 706 of file base_postgres_cache.hpp.
|
staticconstexpr |
Definition at line 395 of file base_postgres_cache.hpp.
|
staticconstexpr |
Definition at line 393 of file base_postgres_cache.hpp.
|
staticconstexpr |
Definition at line 397 of file base_postgres_cache.hpp.