pub type CacheResponse<R> = CacheResponsePro<'static, 'static, R>;
Expand description
The responder with a Cache-Control
header.
Aliased Type§
pub enum CacheResponse<R> {
Public {
responder: R,
max_age: u32,
must_revalidate: bool,
},
Private {
responder: R,
max_age: u32,
},
NoCache(R),
NoStore(R),
NoCacheControl(R),
// some variants omitted
}
Variants§
Implementations
Source§impl<'r, 'o: 'r, R: Responder<'r, 'o>> CacheResponsePro<'r, 'o, R>
impl<'r, 'o: 'r, R: Responder<'r, 'o>> CacheResponsePro<'r, 'o, R>
Sourcepub fn public_only_release(
responder: R,
_max_age: u32,
_must_revalidate: bool,
) -> CacheResponsePro<'r, 'o, R>
pub fn public_only_release( responder: R, _max_age: u32, _must_revalidate: bool, ) -> CacheResponsePro<'r, 'o, R>
Use public cache only when this program is built on the release mode.
Sourcepub fn private_only_release(
responder: R,
_max_age: u32,
) -> CacheResponsePro<'r, 'o, R>
pub fn private_only_release( responder: R, _max_age: u32, ) -> CacheResponsePro<'r, 'o, R>
Use private cache only when this program is built on the release mode.