@kev와 제프-cuscutis @는
How to configure static content cache per folder and extension in IIS7?
OU가 설정할 수있는 ASP.NET 응용 프로그램의 web.config 파일에 XML 구성을 사용하여 HTTP 응답 헤더의 만료를 구성 할 수있는 방법을 제공 한 루트의 Web.config 중 하나에서 전체 폴더에 대한 특정 캐시 헤더 :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- Note the use of the 'location' tag to specify which
folder this applies to-->
<location path="images">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00:00:15" />
</staticContent>
</system.webServer>
</location>
</configuration>
또는 콘텐츠 폴더에 web.config 파일에서 다음을 지정할 수 있습니다
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00:00:15" />
</staticContent>
</system.webServer>
</configuration>
특정 파일 형식을 대상으로하는 메커니즘이 내장되어 있습니다.
파일 단위로 할 수 있습니다. 경로 속성을 사용하여 파일 이름 포함
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path="YourFileNameHere.xml">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>
</location>
</configuration>