MCPcopy Create free account
hub / github.com/erans/pgsqlite / register_cache

Method register_cache

src/cache/memory_aware_manager.rs:191–200  ·  view source on GitHub ↗

Register a cache for memory management

(&self, name: String, cache: Arc<T>)

Source from the content-addressed store, hash-verified

189
190 /// Register a cache for memory management
191 pub fn register_cache<T>(&self, name: String, cache: Arc<T>)
192 where
193 T: ManagedCache + Send + Sync + 'static,
194 {
195 let mut caches = self.managed_caches.write();
196 caches.push((name, cache));
197
198 let mut stats = self.stats.write();
199 stats.total_managed_caches = caches.len();
200 }
201
202 /// Create and register a new TTL cache
203 pub fn create_and_register_cache<K, V>(&self, name: String) -> Arc<TtlCache<K, V>>

Callers 2

register_global_cacheFunction · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected