pub trait CacheAccess {
type Backend;
type ConcurrencyManager;
type Offload;
// Required methods
fn backend(&self) -> Arc<Self::Backend>;
fn policy(&self) -> Arc<PolicyConfig>;
fn concurrency_manager(&self) -> Self::ConcurrencyManager;
fn offload(&self) -> Self::Offload;
}Expand description
Trait for accessing cache internals.
This enables the generated #[cached] code to work with different
cache ownership patterns: &Cache, Arc<Cache>, etc.
Required Associated Types§
Sourcetype ConcurrencyManager
type ConcurrencyManager
The concurrency manager type.
Required Methods§
Sourcefn policy(&self) -> Arc<PolicyConfig>
fn policy(&self) -> Arc<PolicyConfig>
Get a shared reference to the policy.
Sourcefn concurrency_manager(&self) -> Self::ConcurrencyManager
fn concurrency_manager(&self) -> Self::ConcurrencyManager
Get the concurrency manager.