From 7b04a20e9ff523b5b43f06359e056304ee15257d Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Sat, 30 Apr 2016 23:03:34 +0100 Subject: [PATCH] refs #653 Make small cache values pinned, so they are sync loaded at start. --- src/blackcore/data/authenticateduser.h | 3 +++ src/blackcore/data/globalsetup.h | 3 +++ src/blackcore/data/updateinfo.h | 3 +++ src/blackcore/data/vatsimsetup.h | 3 +++ src/blackgui/components/data/lastselections.h | 3 +++ 5 files changed, 15 insertions(+) diff --git a/src/blackcore/data/authenticateduser.h b/src/blackcore/data/authenticateduser.h index 152aabcb1..704b98587 100644 --- a/src/blackcore/data/authenticateduser.h +++ b/src/blackcore/data/authenticateduser.h @@ -27,6 +27,9 @@ namespace BlackCore //! Key in data cache static const char *key() { return "dbuser"; } + //! First load is synchronous + static bool isPinned() { return true; } + //! Default value static const BlackMisc::Network::CAuthenticatedUser &defaultValue() { diff --git a/src/blackcore/data/globalsetup.h b/src/blackcore/data/globalsetup.h index 11ca523d9..5c29f8e8c 100644 --- a/src/blackcore/data/globalsetup.h +++ b/src/blackcore/data/globalsetup.h @@ -189,6 +189,9 @@ namespace BlackCore //! Key in data cache static const char *key() { return "bootstrap"; } + //! First load is synchronous + static bool isPinned() { return true; } + //! Default value static const CGlobalSetup &defaultValue() { diff --git a/src/blackcore/data/updateinfo.h b/src/blackcore/data/updateinfo.h index bd6816c26..6424998f5 100644 --- a/src/blackcore/data/updateinfo.h +++ b/src/blackcore/data/updateinfo.h @@ -118,6 +118,9 @@ namespace BlackCore //! Key in data cache static const char *key() { return "version"; } + //! First load is synchronous + static bool isPinned() { return true; } + //! Default value static const CUpdateInfo &defaultValue() { diff --git a/src/blackcore/data/vatsimsetup.h b/src/blackcore/data/vatsimsetup.h index 0e8584aac..5082349a2 100644 --- a/src/blackcore/data/vatsimsetup.h +++ b/src/blackcore/data/vatsimsetup.h @@ -121,6 +121,9 @@ namespace BlackCore //! Key in data cache static const char *key() { return "vatsim"; } + //! First load is synchronous + static bool isPinned() { return true; } + //! Default value static const CVatsimSetup &defaultValue() { diff --git a/src/blackgui/components/data/lastselections.h b/src/blackgui/components/data/lastselections.h index ca8f2ea40..939591f13 100644 --- a/src/blackgui/components/data/lastselections.h +++ b/src/blackgui/components/data/lastselections.h @@ -75,6 +75,9 @@ namespace BlackGui return ls; } + //! First load is synchronous + static bool isPinned() { return true; } + //! Key in data cache static const char *key() { return "dbownmodelscomponent"; } };