added clear cache method to isettings interface

This commit is contained in:
Andrei Yankovich 2021-12-24 15:21:23 +03:00
parent bf0283a8c2
commit 2464bf55cf
2 changed files with 8 additions and 0 deletions

View File

@ -17,6 +17,10 @@ ISettings::ISettings(SettingsSaveMode mode) {
_mode = mode; _mode = mode;
} }
void ISettings::clearCache() {
_cache.clear();
}
SettingsSaveMode ISettings::getMode() const { SettingsSaveMode ISettings::getMode() const {
return _mode; return _mode;
} }

View File

@ -151,6 +151,10 @@ protected:
*/ */
virtual void setValueImplementation(const QString key, const QVariant& value) = 0; virtual void setValueImplementation(const QString key, const QVariant& value) = 0;
/**
* @brief clearCache This method clear all data from cache.
*/
void clearCache();
private: private:
SettingsSaveMode _mode = SettingsSaveMode::Auto; SettingsSaveMode _mode = SettingsSaveMode::Auto;