Trait async_graphql::dataloader::CacheFactory [−][src]
This is supported on crate feature
dataloader
only.Factory for creating cache storage.
Required methods
fn create<K, V>(&self) -> Box<dyn CacheStorage<Key = K, Value = V>> where
K: Send + Sync + Clone + Eq + Hash + 'static,
V: Send + Sync + Clone + 'static,
[src]
K: Send + Sync + Clone + Eq + Hash + 'static,
V: Send + Sync + Clone + 'static,
Create a cache storage.
TODO: When GAT is stable, this memory allocation can be optimized away.
Implementors
impl CacheFactory for HashMapCache
[src]
fn create<K, V>(&self) -> Box<dyn CacheStorage<Key = K, Value = V>> where
K: Send + Sync + Clone + Eq + Hash + 'static,
V: Send + Sync + Clone + 'static,
[src]
K: Send + Sync + Clone + Eq + Hash + 'static,
V: Send + Sync + Clone + 'static,
impl CacheFactory for LruCache
[src]
fn create<K, V>(&self) -> Box<dyn CacheStorage<Key = K, Value = V>> where
K: Send + Sync + Clone + Eq + Hash + 'static,
V: Send + Sync + Clone + 'static,
[src]
K: Send + Sync + Clone + Eq + Hash + 'static,
V: Send + Sync + Clone + 'static,