hyperlane-plugin-cache 23.2.0

A 64-way sharded bounded in-memory and HTTP response cache plugin for the Hyperlane framework with TTL, byte-budget eviction, single-flight stampede coalescing, pluggable CacheStore traits, and RFC Cache-Control/Vary/Age/X-Cache handling.
Documentation
1
2
3
4
5
6
7
8
use super::*;

/// Boxed `Send` future returned by async [`CacheStore`] trait methods.
pub type CacheFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;

/// Fixed-size 64-way sharded single-flight inflight table.
pub(crate) type InFlightShardArray =
    Box<[Mutex<HashMapXxHash3_64<String, Arc<InFlightSlot>>>; CACHE_SHARD_COUNT]>;