1#![cfg_attr(doc, doc = document_features::document_features!())]
6#![deny(
7 trivial_casts,
8 trivial_numeric_casts,
9 unused_extern_crates,
10 unused_import_braces,
11 unused_qualifications
12)]
13#![warn(
14 missing_debug_implementations,
15 missing_docs,
16 dead_code,
17 clippy::unwrap_used,
18 clippy::expect_used
19)]
20
21use http_cache_reqwest::{
22 Cache, CacheMode, CacheOptions, HttpCache, HttpCacheOptions, MokaManager,
23};
24
25#[cfg(feature = "client")]
26pub mod client;
27#[cfg(feature = "server")]
28pub mod server;
29
30pub(crate) fn cache() -> Cache<MokaManager> {
33 Cache(HttpCache {
34 mode: CacheMode::Default,
35 manager: MokaManager::default(),
36 options: HttpCacheOptions {
37 cache_options: Some(CacheOptions { shared: false, ..CacheOptions::default() }),
38 ..HttpCacheOptions::default()
39 },
40 })
41}