Skip to content

Commit d3aa9ca

Browse files
committed
Add cache control strategy
1 parent a90fdb8 commit d3aa9ca

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main/resources/application.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ server.servlet.context-path=/mymoney
77
# Hold sessions indefinitely
88
server.servlet.session.timeout=0
99
server.servlet.session.tracking-modes = cookie
10+
# Serve css with version control
11+
spring.web.resources.chain.enabled=true
12+
spring.web.resources.chain.strategy.content.enabled=true
13+
spring.web.resources.chain.strategy.content.paths=/css/**
14+
spring.web.resources.cache.cachecontrol.max-age=1d
15+
spring.web.resources.cache.cachecontrol.cache-public=true
16+
spring.web.resources.cache.cachecontrol.must-revalidate=true
1017

1118
# Actuator configuration
1219
management.endpoints.web.exposure.include=info,metrics,health,loggers,httpexchanges,scheduledtasks,integrationgraph

0 commit comments

Comments
 (0)