Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/common/cache_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,26 +159,26 @@ impl CacheControl {
}

/// Set the `max-age` directive.
pub fn with_max_age(mut self, seconds: Duration) -> Self {
self.max_age = Some(seconds.into());
pub fn with_max_age(mut self, duration: Duration) -> Self {
self.max_age = Some(duration.into());
self
}

/// Set the `max-stale` directive.
pub fn with_max_stale(mut self, seconds: Duration) -> Self {
self.max_stale = Some(seconds.into());
pub fn with_max_stale(mut self, duration: Duration) -> Self {
self.max_stale = Some(duration.into());
self
}

/// Set the `min-fresh` directive.
pub fn with_min_fresh(mut self, seconds: Duration) -> Self {
self.min_fresh = Some(seconds.into());
pub fn with_min_fresh(mut self, duration: Duration) -> Self {
self.min_fresh = Some(duration.into());
self
}

/// Set the `s-maxage` directive.
pub fn with_s_max_age(mut self, seconds: Duration) -> Self {
self.s_max_age = Some(seconds.into());
pub fn with_s_max_age(mut self, duration: Duration) -> Self {
self.s_max_age = Some(duration.into());
self
}
}
Expand Down