Skip to main content

Module cache

Module cache 

Source
Expand description

Cache abstraction layer

Provides multi-level caching with memory support

Structs§

CacheStats
MemoryCache
MultiLevelCache
NegativeCache
带负缓存的缓存包装器

Enums§

CacheLookup
缓存查找结果

Traits§

Cache

Functions§

read_through
Read-through(同步版):缓存未命中时通过 loader 回源加载,写入缓存后返回
read_through_async
Read-through(异步版):缓存未命中时通过异步 loader 回源加载,写入缓存后返回
write_around
Write-around(写旁路):仅写后端存储,同时失效缓存中的旧值
write_through
Write-through(同步版):同时写入缓存和后端存储(通过 writer 回调)
write_through_async
Write-through(异步版):同时写入缓存和异步后端存储