refs #653 Make small cache values pinned, so they are sync loaded at start.

This commit is contained in:
Mathew Sutcliffe
2016-04-30 23:03:34 +01:00
parent a492189874
commit 7b04a20e9f
5 changed files with 15 additions and 0 deletions

View File

@@ -27,6 +27,9 @@ namespace BlackCore
//! Key in data cache //! Key in data cache
static const char *key() { return "dbuser"; } static const char *key() { return "dbuser"; }
//! First load is synchronous
static bool isPinned() { return true; }
//! Default value //! Default value
static const BlackMisc::Network::CAuthenticatedUser &defaultValue() static const BlackMisc::Network::CAuthenticatedUser &defaultValue()
{ {

View File

@@ -189,6 +189,9 @@ namespace BlackCore
//! Key in data cache //! Key in data cache
static const char *key() { return "bootstrap"; } static const char *key() { return "bootstrap"; }
//! First load is synchronous
static bool isPinned() { return true; }
//! Default value //! Default value
static const CGlobalSetup &defaultValue() static const CGlobalSetup &defaultValue()
{ {

View File

@@ -118,6 +118,9 @@ namespace BlackCore
//! Key in data cache //! Key in data cache
static const char *key() { return "version"; } static const char *key() { return "version"; }
//! First load is synchronous
static bool isPinned() { return true; }
//! Default value //! Default value
static const CUpdateInfo &defaultValue() static const CUpdateInfo &defaultValue()
{ {

View File

@@ -121,6 +121,9 @@ namespace BlackCore
//! Key in data cache //! Key in data cache
static const char *key() { return "vatsim"; } static const char *key() { return "vatsim"; }
//! First load is synchronous
static bool isPinned() { return true; }
//! Default value //! Default value
static const CVatsimSetup &defaultValue() static const CVatsimSetup &defaultValue()
{ {

View File

@@ -75,6 +75,9 @@ namespace BlackGui
return ls; return ls;
} }
//! First load is synchronous
static bool isPinned() { return true; }
//! Key in data cache //! Key in data cache
static const char *key() { return "dbownmodelscomponent"; } static const char *key() { return "dbownmodelscomponent"; }
}; };