@@ -159,26 +159,26 @@ impl CacheControl {
159159 }
160160
161161 /// 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 ( ) ) ;
164164 self
165165 }
166166
167167 /// 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 ( ) ) ;
170170 self
171171 }
172172
173173 /// 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 ( ) ) ;
176176 self
177177 }
178178
179179 /// 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 ( ) ) ;
182182 self
183183 }
184184}
0 commit comments