Rust

none

Module

[None]: the adapter that stores nothing.

Contents

use utopia_cache::None;
Rust
pub struct None

Stores nothing: every load misses, every save fails, purges and flushes succeed.

Rust
use php_std::types::Value;
use utopia_cache::{Adapter, None};

assert!(!None.save("key", &Value::from("value"), "", 0).await?);
assert_eq!(None.load("key", 60, "").await?, Option::None);
assert!(None.purge("key", "").await?);