🤍 전 강의 25% 할인 중 🤍
2024년 상반기를 돌아보고 하반기에도 함께 성장해요!인프런이 준비한 25% 할인 받으러 가기 >>
132만명의 커뮤니티!! 함께 토론해봐요.
강의에서 캐시의 조건을 설정할 때no cache, no store, must-revalidate 셋을 모두 설정해야한다고 하셨습니다.그래서 제가 스프링(spring boot말고 그냥 spring입니다)에서 WebContentInterceptor에CacheControl 클래스로 조건을 설정하려고 했습니다.@Bean public MappedInterceptor webContentInterceptor() { String[] includePatterns = {"/board/game/**"}; WebContentInterceptor wci = new WebContentInterceptor(); CacheControl cacheControl = CacheControl.noCache(); wci.addCacheMapping(cacheControl, "/**"); return new MappedInterceptor(includePatterns, wci); } 그런데 CacheControl에서는 no cache와 no store를 동시에 설정을 할 수 없었습니다.https://github.com/spring-projects/spring-framework/issues/18354위 링크에서 글을 보면 no store가 이전 브라우저에서 동작하지 않는 것을 확인하지 못했다고 말을 하고 있는 것 같습니다. 그래서 no cache와 no store 둘을 같이 사용할 일이 없다고 하는 것 같아서요.아니면 제가 직접 response를 건드려서 no cache와 no store를 둘 다 설정해야만 할까요?