use {
http::*,
std::{sync::*, time::*},
};
pub type CacheDurationHook = Arc<Box<dyn Fn(CacheDurationHookContext) -> Option<Duration> + Send + Sync>>;
pub struct CacheDurationHookContext<'own> {
pub uri: &'own Uri,
pub headers: &'own HeaderMap,
}
impl<'own> CacheDurationHookContext<'own> {
pub fn new(uri: &'own Uri, headers: &'own HeaderMap) -> Self {
Self { uri, headers }
}
}