Add RFC-8246 support to CacheControl
This commit adds the "immutable" Cache-Control directives in `CacheControl`. Closes gh-29955
This commit is contained in:
committed by
Brian Clozel
parent
84c7f07364
commit
616e7779e0
@@ -101,4 +101,10 @@ public class CacheControlTests {
|
||||
assertThat(cc.getHeaderValue()).isEqualTo("max-age=3600, stale-while-revalidate=7200");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void immutable() throws Exception {
|
||||
CacheControl cc = CacheControl.maxAge(Duration.ofHours(1)).immutable();
|
||||
assertThat(cc.getHeaderValue()).isEqualTo("max-age=3600, immutable");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user