mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #781, use admit in database reader
* added amit functions in readers * cacheHasChanged functions (needed because data of caches are loaded in background) * pinned small caches * CDatabaseReader::readInBackgroundThread uses admitCaches now
This commit is contained in:
@@ -42,8 +42,8 @@ namespace BlackCore
|
||||
//! Trait for DB distributor cache
|
||||
struct TDbDistributorCache : public BlackMisc::TDataTrait<BlackMisc::Simulation::CDistributorList>
|
||||
{
|
||||
//! Defer loading (no currently small)
|
||||
static constexpr bool isDeferred() { return false; }
|
||||
//! First load is synchronous, distributors is a small cache
|
||||
static constexpr bool isPinned() { return true; }
|
||||
|
||||
//! Key in data cache
|
||||
static const char *key() { return "dbdistributorcache"; }
|
||||
@@ -83,8 +83,8 @@ namespace BlackCore
|
||||
//! Trait for DB countries
|
||||
struct TDbCountryCache : public BlackMisc::TDataTrait<BlackMisc::CCountryList>
|
||||
{
|
||||
//! Defer loading (no currently small)
|
||||
static constexpr bool isDeferred() { return false; }
|
||||
//! First load is synchronous, countries is a small cache
|
||||
static constexpr bool isPinned() { return true; }
|
||||
|
||||
//! Key in data cache
|
||||
static const char *key() { return "dbcountrycache"; }
|
||||
|
||||
Reference in New Issue
Block a user