Skip to main content

Module stores

Module stores 

Source

Re-exports§

pub use sharded::DefaultShardHasher;
pub use sharded::ShardHasher;
pub use sharded::ShardedCache;
pub use sharded::ShardedCacheBase;
pub use sharded::ShardedCacheBuilder;
pub use sharded::ShardedExpiringCache;
pub use sharded::ShardedExpiringCacheBase;
pub use sharded::ShardedExpiringCacheBuilder;
pub use sharded::ShardedExpiringLruCache;
pub use sharded::ShardedExpiringLruCacheBase;
pub use sharded::ShardedExpiringLruCacheBuilder;
pub use sharded::ShardedLruCache;
pub use sharded::ShardedLruCacheBase;
pub use sharded::ShardedLruCacheBuilder;
pub use sharded::ShardedLruTtlCache;time_stores
pub use sharded::ShardedLruTtlCacheBase;time_stores
pub use sharded::ShardedLruTtlCacheBuilder;time_stores
pub use sharded::ShardedTtlCache;time_stores
pub use sharded::ShardedTtlCacheBase;time_stores
pub use sharded::ShardedTtlCacheBuilder;time_stores

Modules§

sharded

Structs§

AsyncRedisCacheasync_core and redis_store and (redis_smol or redis_tokio)
Cache store backed by redis
AsyncRedisCacheBuilderasync_core and redis_store and (redis_smol or redis_tokio)
DiskCachedisk_store
Cache store backed by disk
DiskCacheBuilderdisk_store
ExpiringCache
Size-unbounded cache where each value controls its own expiry via Expires.
ExpiringCacheBuilder
Builder for ExpiringCache.
ExpiringLruCache
LRU-bounded cache with per-value expiry.
ExpiringLruCacheBuilder
Builder for ExpiringLruCache.
HasEvicttime_stores
Typestate marker for LruTtlCacheBuilder: eviction callback has been set.
LruCache
Least Recently Used / Sized Cache
LruCacheBuilder
Builder for LruCache.
LruTtlCachetime_stores
Timed LRU Cache
LruTtlCacheBuildertime_stores
Builder for LruTtlCache.
NoEvicttime_stores
Typestate marker for LruTtlCacheBuilder: no eviction callback set.
RedisCacheredis_store
Cache store backed by redis
RedisCacheBuilderredis_store
TimedEntry
A cached value paired with its insertion timestamp for TTL tracking.
TtlCachetime_stores
Cache store bound by time
TtlCacheBuildertime_stores
Builder for TtlCache.
TtlSortedCachetime_stores
A cache enforcing time expiration and an optional maximum size. When a maximum size is specified, the values are dropped in the order of expiration date, e.g. the next value to expire is dropped. This cache is intended for high read scenarios to allow for concurrent reads while still enforcing expiration and an optional maximum cache size.
TtlSortedCacheBuildertime_stores
Builder for TtlSortedCache.
UnboundCache
Default unbounded cache
UnboundCacheBuilder
Builder for UnboundCache.

Enums§

BuildError
Error returned by cache builder build() methods.
DiskCacheBuildErrordisk_store
DiskCacheErrordisk_store
RedisCacheBuildErrorredis_store
RedisCacheErrorredis_store

Traits§

CacheEvict
Trait for cache stores that support explicit eviction of expired entries.
Expires
Implemented by values stored in ExpiringLruCache and ExpiringCache so the value itself decides when it is stale. Expired values are not returned by lookups and are removed on access:

Type Aliases§

TtlSortedCacheErrortime_stores
Public alias for the internal error type — use this name when matching on errors returned by TtlSortedCache operations (e.g. Cached::cache_try_set).