Skip to main content

cache_page

Function cache_page 

Source
pub fn cache_page(ttl: Duration) -> CachePageLayer
Expand description

Return a CachePageLayer that caches eligible GET/HEAD responses for ttl.

Mount it with Router::layer(cache_page(Duration::from_secs(60))).