Skip to content

Commit ac3847b

Browse files
committed
Clarify Javadoc for CacheControl.noCache,noStore
This change makes clear that this is the intent of the CacheControl API not to provide a way to configure both "no-cache" and "no-store" directives for the "Cache-Control" header. Issue: SPR-13780
1 parent 513c1ea commit ac3847b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-web/src/main/java/org/springframework/http/CacheControl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public static CacheControl maxAge(long maxAge, TimeUnit unit) {
114114
* clients sending conditional requests (with "ETag", "If-Modified-Since" headers) and the server responding
115115
* with "304 - Not Modified" status.
116116
* <p>In order to disable caching and minimize requests/responses exchanges, the {@link #noStore()} directive
117-
* should be used.
117+
* should be used instead of {@link #noCache()}.
118118
* @return {@code this}, to facilitate method chaining
119119
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.2">rfc7234 section 5.2.2.2</a>
120120
*/

0 commit comments

Comments
 (0)