Skip to content
Snippets Groups Projects
Commit 1fd138fe authored by OZGCloud's avatar OZGCloud
Browse files

minor cleanup - cache 30 Days

parent 9416c6ee
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ import org.springframework.web.servlet.resource.PathResourceResolver;
@Configuration
public class WebConfig implements WebMvcConfigurer {
private static String RESOURCE_LOCATION = "classpath:/META-INF/resources/";
private static final String RESOURCE_LOCATION = "classpath:/META-INF/resources/";
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
......@@ -22,7 +22,7 @@ public class WebConfig implements WebMvcConfigurer {
registry.addResourceHandler("/*.js", "/*.css", "/*.ttf", "/*.woff", "/*.woff2", "/*.eot",
"/*.svg", "/*.svf", "/*.otf")
.addResourceLocations(RESOURCE_LOCATION)
.setCacheControl(CacheControl.maxAge(365, TimeUnit.DAYS).cachePublic())
.setCacheControl(CacheControl.maxAge(30, TimeUnit.DAYS).cachePublic())
.resourceChain(true)
.addResolver(new PathResourceResolver());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment