pub struct TwoTierCache { /* private fields */ }Implementations§
Source§impl TwoTierCache
impl TwoTierCache
pub fn new( strategy: ResponseCacheStrategy, config: TwoTierCacheConfig, ) -> LlmixResult<Self>
pub async fn get(&self, key: &str) -> Option<CacheResult>
pub async fn set(&self, key: &str, value: &str)
pub async fn clear(&self) -> LlmixResult<()>
pub async fn close(&self)
pub async fn get_stats(&self) -> ResponseCacheStats
Auto Trait Implementations§
impl !Freeze for TwoTierCache
impl !RefUnwindSafe for TwoTierCache
impl Send for TwoTierCache
impl Sync for TwoTierCache
impl Unpin for TwoTierCache
impl UnsafeUnpin for TwoTierCache
impl !UnwindSafe for TwoTierCache
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