Im adding a cache-controll header via
<code> return ResponseEntity.ok()
.cacheControl(CacheControl.maxAge(1, TimeUnit.DAYS))
.header("Test", tag).header("Cache-Control","public")
.body(Responses);
</code>
<code> return ResponseEntity.ok()
.cacheControl(CacheControl.maxAge(1, TimeUnit.DAYS))
.header("Test", tag).header("Cache-Control","public")
.body(Responses);
</code>
return ResponseEntity.ok()
.cacheControl(CacheControl.maxAge(1, TimeUnit.DAYS))
.header("Test", tag).header("Cache-Control","public")
.body(Responses);
But in the response, the Cache-contorl header is duplicated and caching does not work
<code>status=200 headers={Cache-Control=[private, max-age=1, public],
</code>
<code>status=200 headers={Cache-Control=[private, max-age=1, public],
</code>
status=200 headers={Cache-Control=[private, max-age=1, public],
Is this because of spring security? Do I need to explicitly set the cache via
<code> return ResponseEntity.ok()
.cacheControl(CacheControl.maxAge(1, TimeUnit.DAYS).cachePublic())
.header("Test", tag)
.body(Responses);
</code>
<code> return ResponseEntity.ok()
.cacheControl(CacheControl.maxAge(1, TimeUnit.DAYS).cachePublic())
.header("Test", tag)
.body(Responses);
</code>
return ResponseEntity.ok()
.cacheControl(CacheControl.maxAge(1, TimeUnit.DAYS).cachePublic())
.header("Test", tag)
.body(Responses);
Why is this happening I couldnt find any documentation?
This is the closest thing ive seen
https://docs.spring.io/spring-security/reference/features/exploits/headers.html#headers-cache-control