pub trait Query {
type CacheKey: Key;
type Output;
// Required methods
fn cache_key(&self) -> Self::CacheKey;
fn query(&self, ctx: &mut QueryContext) -> Result<Self::Output, Error>;
// Provided method
fn never_cache(&self) -> bool { ... }
}
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn never_cache(&self) -> bool
fn never_cache(&self) -> bool
Whether the query should never be cached.
If true, this query will always be re-calculated. Even if not cached, downstream queries can be cached.