[][src]Trait async_graphql::dataloader::CacheStorage

pub trait CacheStorage: Send + Sync + 'static {
    type Key: Send + Hash + Eq + Clone + 'static;
    type Value: Send + Clone + 'static;
    pub fn get(&self, key: &Self::Key) -> Option<Self::Value>;
pub fn set(&self, key: Self::Key, value: Self::Value); }
This is supported on crate feature dataloader only.

Cache storage for a loader.

Associated Types

type Key: Send + Hash + Eq + Clone + 'static[src]

Type of key.

type Value: Send + Clone + 'static[src]

Type of value.

Loading content...

Required methods

pub fn get(&self, key: &Self::Key) -> Option<Self::Value>[src]

Load value from cache by key.

pub fn set(&self, key: Self::Key, value: Self::Value)[src]

Put value to cache by key.

Loading content...

Implementors

impl<T: CacheStorage> CacheStorage for LruCache<T>[src]

type Key = T::Key

type Value = T::Value

Loading content...