Crate ezcache

Source
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_CacheStore
A macro to be used by ambassador::Delegate to delegate CacheStore
ambassador_impl_TryCacheStore
A macro to be used by ambassador::Delegate to delegate TryCacheStore
implThreadUnsafe
Macro to automatically implement CacheStore on a struct that implements ThreadSafeCacheStore
implTryThreadUnsafe
Macro to automatically implement TryCacheStore on a struct that implements ThreadSafeTryCacheStore

Structs§

TryCacheStoreErrorMap
Struct to convert the error type of a TryCacheStore into another

Traits§

CacheStore
Trait for a infallible cache store
TryCacheStore
Trait for a fallible cache store, analogous to CacheStore