pub fn new_shared_cache<B: Block, H: Hasher>(shared_cache_size: usize) -> SharedCache<B, H> {
	let cache_items = shared_cache_size / 100; // Guestimate, potentially inaccurate
	Arc::new(Mutex::new(Cache {
		storage: LruCache::new(cache_items),
		hashes: LruCache::new(cache_items),
		modifications: VecDeque::new(),
	}))
}
/// Create new shared cache instance with given max memory usage.
Create new shared cache instance with given max memory usage.
Create new shared cache instance with given max memory usage .
pub fn new_shared_cache<B: Block, H: Hasher>(shared_cache_size: usize) -> SharedCache<B, H> {
	let cache_items = shared_cache_size / 100; // Guestimate, potentially inaccurate
	Arc::new(Mutex::new(Cache {
		storage: LruCache::new(cache_items),
		hashes: LruCache::new(cache_items),
		modifications: VecDeque::new(),
	}))
}
pub fn new_shared_cache < B : Block , H : Hasher > ( shared_cache_size : usize ) -> SharedCache < B , H > { let cache_items = shared_cache_size / 100 ; // Guestimate, potentially inaccurate Arc :: new ( Mutex :: new ( Cache { storage : LruCache :: new ( cache_items ) , hashes : LruCache :: new ( cache_items ) , modifications : VecDeque :: new ( ) , } ) ) }
Create new shared cache instance with given max memory usage.
Create new shared cache instance with given max memory usage .
shared_cache_size
usize
shared_cache_size
usize