pub trait DefaultCacheableKey: Debug { }Expand description
Marker trait for types that want to use the default cache key behavior.
Implement this trait for any type that should automatically get a cache key
derived from its Debug representation. This is the simplest way to make
a type cacheable.
§Examples
use cachelito_core::DefaultCacheableKey;
#[derive(Debug, Clone)]
struct Product {
id: u32,
name: String,
}
// Enable default cache key generation based on Debug
impl DefaultCacheableKey for Product {}§Note
Types implementing this trait must also implement Debug, as the default
cache key is generated using format!("{:?}", value).