Expand description
Easy library with some abstractions to implement cache stores.
Provides several features like:
- Traits to implement cache stores. Feature faillible and infallible variants.
- Cache stores with default generators that activate by default when needed.
- Thread safe variants of everything possible under the “thread-safe” feature.
- Default cache stores implemented for filesystem, memory, etc. (might require some features)
§Examples
- stores: For examples on some common stores implemented.
- generative: For examples on the concept of generative cache stores.
§Contributing, Issues & Discussions
For anything related, please consult the official repository: https://github.com/javalsai/rs-ezcache
Modules§
- generative
- This module provides cache stores with generator functions.
- prelude
- Prelude of the module.
- stores
- Several implementations of cache stores for common use cases, all of require std for now:
- thread_
safe - Thread safe traits around implementations of all possible cache store types. They are analogous
to the default traits at the root of this crate but each method has
ts_
prepended (Thread Safe), this allows the thread safe implementations to implement the thread unsafe methods too.
Macros§
- ambassador_
impl_ Cache Store - A macro to be used by
ambassador::Delegate
to delegateCacheStore
- ambassador_
impl_ TryCache Store - A macro to be used by
ambassador::Delegate
to delegateTryCacheStore
- impl
Thread Unsafe - Macro to automatically implement
CacheStore
on a struct that implementsThreadSafeCacheStore
- impl
TryThread Unsafe - Macro to automatically implement
TryCacheStore
on a struct that implementsThreadSafeTryCacheStore
Structs§
- TryCache
Store Error Map - Struct to convert the error type of a
TryCacheStore
into another
Traits§
- Cache
Store - Trait for a infallible cache store
- TryCache
Store - Trait for a fallible cache store, analogous to CacheStore