GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgFrontend::CacheManager::Impl Class Reference
Inheritance diagram for GpgFrontend::CacheManager::Impl:
Inheritance graph
Collaboration diagram for GpgFrontend::CacheManager::Impl:
Collaboration graph

Public Member Functions

void SaveDurableCache (QString key, const QJsonDocument &value, bool flush)
 
auto LoadDurableCache (const QString &key) -> QJsonDocument
 
auto LoadDurableCache (const QString &key, QJsonDocument default_value) -> QJsonDocument
 
auto ResetDurableCache (const QString &key) -> bool
 
void FlushCacheStorage ()
 
void SaveCache (const QString &key, QString value)
 
auto LoadCache (const QString &key) -> QString
 
void ResetCache (const QString &key)
 

Private Slots

void slot_flush_cache_storage ()
 

Private Member Functions

void load_all_cache_storage ()
 
void register_cache_key (const QString &key)
 

Static Private Member Functions

static auto get_data_object_key (const QString &key) -> QString
 Get the data object key object. More...
 
static auto load_cache_storage (const QString &key, QJsonDocument default_value) -> QJsonDocument
 

Private Attributes

QCache< QString, QString > runtime_cache_storage_
 
ThreadSafeMap< QString, QJsonDocument > durable_cache_storage_
 
QJsonArray key_storage_
 
QTimer * flush_timer_
 
const QString drk_key_ = "__cache_manage_data_register_key_list"
 

Member Function Documentation

◆ get_data_object_key()

static auto GpgFrontend::CacheManager::Impl::get_data_object_key ( const QString &  key) -> QString
inlinestaticprivate

Get the data object key object.

Parameters
key
Returns
QString

Referenced by load_cache_storage().

◆ load_cache_storage()

static auto GpgFrontend::CacheManager::Impl::load_cache_storage ( const QString &  key,
QJsonDocument  default_value 
) -> QJsonDocument
inlinestaticprivate
Parameters
key
default_value
Returns
QJsonObject

References get_data_object_key(), and GpgFrontend::SingletonFunctionObject< DataObjectOperator >::GetInstance().

◆ register_cache_key()

void GpgFrontend::CacheManager::Impl::register_cache_key ( const QString &  key)
inlineprivate
Parameters
key

The documentation for this class was generated from the following file: