pub fn enable_cache<K>(&self, enable: bool)
    where
        K: Send + Sync + Hash + Eq + Clone + 'static,
        T: Loader<K>,
    {
        let tid = TypeId::of::<K>();
        let mut requests = self.requests.lock().unwrap();
        let typed_requests = requests
            .get_mut(&tid)
            .unwrap()
            .downcast_mut::<Requests<K, T>>()
            .unwrap();
        typed_requests.disable_cache = !enable;
    }
/// Enable/Disable cache of specified loader.
Enable/Disable cache of specified loader.
Enable / Disable cache of specified loader .
pub fn enable_cache<K>(&self, enable: bool)
    where
        K: Send + Sync + Hash + Eq + Clone + 'static,
        T: Loader<K>,
    {
        let tid = TypeId::of::<K>();
        let mut requests = self.requests.lock().unwrap();
        let typed_requests = requests
            .get_mut(&tid)
            .unwrap()
            .downcast_mut::<Requests<K, T>>()
            .unwrap();
        typed_requests.disable_cache = !enable;
    }
pub fn enable_cache < K > ( & self , enable : bool ) where K : Send + Sync + Hash + Eq + Clone + ' static , T : Loader < K > , { let tid = TypeId :: of :: < K > ( ) ; let mut requests = self . requests . lock ( ) . unwrap ( ) ; let typed_requests = requests . get_mut ( & tid ) . unwrap ( ) . downcast_mut :: < Requests < K , T > > ( ) . unwrap ( ) ; typed_requests . disable_cache = ! enable ; }
Enable/Disable cache of specified loader.
Enable / Disable cache of specified loader .
&self
enable
bool
&self
enable
bool