pub struct MultiCacheConfig {
pub stores: HashMap<String, CacheConfig>,
}Expand description
Multiple named cache stores (Rails’ several cache stores), deserialized from
a stores map of name → CacheConfig, e.g.:
stores:
primary: { type: memory }
sessions: { type: redis, namespace: sess }Fields§
§stores: HashMap<String, CacheConfig>Implementations§
Source§impl MultiCacheConfig
impl MultiCacheConfig
Sourcepub async fn build_registry(&self) -> Result<CacheRegistry>
pub async fn build_registry(&self) -> Result<CacheRegistry>
Build every configured store into a CacheRegistry.
Trait Implementations§
Source§impl Clone for MultiCacheConfig
impl Clone for MultiCacheConfig
Source§fn clone(&self) -> MultiCacheConfig
fn clone(&self) -> MultiCacheConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MultiCacheConfig
impl Debug for MultiCacheConfig
Source§impl Default for MultiCacheConfig
impl Default for MultiCacheConfig
Source§fn default() -> MultiCacheConfig
fn default() -> MultiCacheConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MultiCacheConfig
impl<'de> Deserialize<'de> for MultiCacheConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MultiCacheConfig
impl RefUnwindSafe for MultiCacheConfig
impl Send for MultiCacheConfig
impl Sync for MultiCacheConfig
impl Unpin for MultiCacheConfig
impl UnsafeUnpin for MultiCacheConfig
impl UnwindSafe for MultiCacheConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more