close

이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.

linux/apache

x-cache-detail: "Query string present but no explicit expiration time"

mysop 2021. 9. 24. 10:45
728x90
반응형

아파치 캐싱이 안걸리는경우가 많은데

 

x-cache-detail: "Query string present but no explicit expiration time"

 

이런 메세지를 띄우며 캐싱이 MISS나는 경우는

말그래도 쿼리스트링은 있는데 시간설정은 없다는 뜻이다.

 

아파치 로케이션 설정에

캐싱을 걸어야 하는 폴더명을 잡아 설정을 걸어주자

 

<location /폴더명>
     Header set Cache-Control "public,  max-age=600, s-maxage=600"
</location>

 

시간설정은 아파치 설정을 참조하자

https://httpd.apache.org/docs/2.4/ko/mod/mod_expires.html

 

mod_expires - Apache HTTP Server Version 2.4

 

httpd.apache.org

 

728x90
반응형