toHttpCacheControl() — spring-boot Function Reference
Architecture documentation for the toHttpCacheControl() function in WebProperties.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD c449e9e7_42e9_d97b_52f3_7b353eb3298b["toHttpCacheControl()"] e0b2c4cf_74c1_fd5a_cead_591297f73c6a["get()"] c449e9e7_42e9_d97b_52f3_7b353eb3298b -->|calls| e0b2c4cf_74c1_fd5a_cead_591297f73c6a 607eb8fa_f39a_6895_5398_77b29191be00["createCacheControl()"] c449e9e7_42e9_d97b_52f3_7b353eb3298b -->|calls| 607eb8fa_f39a_6895_5398_77b29191be00 ccbac520_6358_bad3_dfbf_ff53f16f5192["whenTrue()"] c449e9e7_42e9_d97b_52f3_7b353eb3298b -->|calls| ccbac520_6358_bad3_dfbf_ff53f16f5192 98991fff_3f21_524f_aec4_839a560a2d02["toCall()"] c449e9e7_42e9_d97b_52f3_7b353eb3298b -->|calls| 98991fff_3f21_524f_aec4_839a560a2d02 74f78909_084d_0d77_7505_2e246dae050f["to()"] c449e9e7_42e9_d97b_52f3_7b353eb3298b -->|calls| 74f78909_084d_0d77_7505_2e246dae050f style c449e9e7_42e9_d97b_52f3_7b353eb3298b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebProperties.java lines 578–597
public @Nullable CacheControl toHttpCacheControl() {
PropertyMapper map = PropertyMapper.get();
CacheControl control = createCacheControl();
map.from(this::getMustRevalidate).whenTrue().toCall(control::mustRevalidate);
map.from(this::getNoTransform).whenTrue().toCall(control::noTransform);
map.from(this::getCachePublic).whenTrue().toCall(control::cachePublic);
map.from(this::getCachePrivate).whenTrue().toCall(control::cachePrivate);
map.from(this::getProxyRevalidate).whenTrue().toCall(control::proxyRevalidate);
map.from(this::getStaleWhileRevalidate)
.to((duration) -> control.staleWhileRevalidate(duration.getSeconds(), TimeUnit.SECONDS));
map.from(this::getStaleIfError)
.to((duration) -> control.staleIfError(duration.getSeconds(), TimeUnit.SECONDS));
map.from(this::getSMaxAge)
.to((duration) -> control.sMaxAge(duration.getSeconds(), TimeUnit.SECONDS));
// check if cacheControl remained untouched
if (control.getHeaderValue() == null) {
return null;
}
return control;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does toHttpCacheControl() do?
toHttpCacheControl() is a function in the spring-boot codebase.
What does toHttpCacheControl() call?
toHttpCacheControl() calls 5 function(s): createCacheControl, get, to, toCall, whenTrue.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free