John
John

Reputation: 1337

SpringBoot, how can I disable cache using application.properties

What I want to do is refreshing the view on back key. So that my user can see updated page.

So I tried to disable cache by adding:

spring.resources.cache.cachecontrol.no-cache=true

However, it doesn't work.

Upvotes: 1

Views: 7017

Answers (1)

Romil Patel
Romil Patel

Reputation: 13777

You can specify which cache type to use by adding spring.cache.type to your configuration. To disable it set the value to NONE.

spring.cache.type=NONE

Upvotes: 5

Related Questions