@@ -159,26 +159,26 @@ impl CacheControl {
159
159
}
160
160
161
161
/// Set the `max-age` directive.
162
- pub fn with_max_age ( mut self , seconds : Duration ) -> Self {
163
- self . max_age = Some ( seconds . into ( ) ) ;
162
+ pub fn with_max_age ( mut self , duration : Duration ) -> Self {
163
+ self . max_age = Some ( duration . into ( ) ) ;
164
164
self
165
165
}
166
166
167
167
/// Set the `max-stale` directive.
168
- pub fn with_max_stale ( mut self , seconds : Duration ) -> Self {
169
- self . max_stale = Some ( seconds . into ( ) ) ;
168
+ pub fn with_max_stale ( mut self , duration : Duration ) -> Self {
169
+ self . max_stale = Some ( duration . into ( ) ) ;
170
170
self
171
171
}
172
172
173
173
/// Set the `min-fresh` directive.
174
- pub fn with_min_fresh ( mut self , seconds : Duration ) -> Self {
175
- self . min_fresh = Some ( seconds . into ( ) ) ;
174
+ pub fn with_min_fresh ( mut self , duration : Duration ) -> Self {
175
+ self . min_fresh = Some ( duration . into ( ) ) ;
176
176
self
177
177
}
178
178
179
179
/// Set the `s-maxage` directive.
180
- pub fn with_s_max_age ( mut self , seconds : Duration ) -> Self {
181
- self . s_max_age = Some ( seconds . into ( ) ) ;
180
+ pub fn with_s_max_age ( mut self , duration : Duration ) -> Self {
181
+ self . s_max_age = Some ( duration . into ( ) ) ;
182
182
self
183
183
}
184
184
}
0 commit comments