Blockchain cache pruning strategy (#3395)

* blockchain cache pruning strategy

* added some internal docs to cache_pruning_strategy

* Update core/client/db/src/cache/mod.rs

Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
This commit is contained in:
Svyatoslav Nikolsky
2019-09-20 09:49:15 +03:00
committed by GitHub
parent d105d3f3a1
commit eba6dd73c6
20 changed files with 161 additions and 104 deletions
+5 -3
View File
@@ -23,8 +23,11 @@ use parking_lot::RwLock;
use kvdb::{KeyValueDB, DBTransaction};
use client::backend::{AuxStore, NewBlockState};
use client::blockchain::{BlockStatus, Cache as BlockchainCache,
HeaderBackend as BlockchainHeaderBackend, Info as BlockchainInfo};
use client::blockchain::{
BlockStatus, Cache as BlockchainCache,
HeaderBackend as BlockchainHeaderBackend, Info as BlockchainInfo,
well_known_cache_keys,
};
use client::cht;
use client::error::{Error as ClientError, Result as ClientResult};
use client::light::blockchain::Storage as LightBlockchainStorage;
@@ -32,7 +35,6 @@ use codec::{Decode, Encode};
use primitives::Blake2Hasher;
use sr_primitives::generic::{DigestItem, BlockId};
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, Zero, One, NumberFor};
use consensus_common::well_known_cache_keys;
use crate::cache::{DbCacheSync, DbCache, ComplexBlockId, EntryType as CacheEntryType};
use crate::utils::{self, meta_keys, Meta, db_err, read_db, block_id_to_lookup_key, read_meta};
use crate::DatabaseSettings;