We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92a393b commit 570e74bCopy full SHA for 570e74b
src/web/cache.rs
@@ -101,9 +101,10 @@ impl AfterMiddleware for CacheMiddleware {
101
.unwrap_or(&CachePolicy::NoCaching);
102
103
if cfg!(test) {
104
- // handlers should never set their own caching headers and
105
- // only use the caching header templates above.
106
- assert!(!res.headers.has::<CacheControl>());
+ assert!(
+ !res.headers.has::<CacheControl>(),
+ "handlers should never set their own caching headers and only use CachePolicy to control caching."
107
+ );
108
}
109
110
res.headers.set(CacheControl(cache.render(config)));
0 commit comments