hyperlane-plugin-cache 23.0.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
//! hyperlane-plugin-cache
//!
//! 64-way sharded bounded cache and HTTP response caching plugin for Hyperlane
//! with TTL/byte-budget eviction, single-flight stampede coalescing, pluggable
//! [`CacheStore`] traits, and RFC `Cache-Control`/`Age`/`X-Cache` support.

mod r#const;
mod r#fn;
mod r#impl;
mod r#static;
mod r#struct;
mod r#trait;
mod r#type;

#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;

pub use {r#const::*, r#struct::*, r#trait::*, r#type::*};

pub(crate) use {r#fn::*, r#static::*};

use std::{
    array::from_fn,
    borrow::Cow,
    collections::VecDeque,
    future::Future,
    pin::Pin,
    str::from_utf8,
    sync::{
        Arc, Mutex, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
        atomic::{AtomicU64, AtomicUsize, Ordering},
    },
    time::{Duration, SystemTime, UNIX_EPOCH},
};

use {
    hyperlane::{
        AGE, AUTHORIZATION, CACHE_CONTROL, CONTENT_ENCODING, COOKIE, Context, HashMapXxHash3_64,
        HttpStatus, Request, RequestQuerys, Response, ResponseError, ServerHook, Status, Stream,
        TRANSFER_ENCODING, VARY, hash_map_xx_hash3_64,
        tokio::sync::{Notify, futures::Notified},
    },
    lombok_macros::*,
};