HttpResponse.CacheControl 속성

정의

HttpCacheability 열거형 값 중 하나와 일치하는 Cache-Control HTTP 헤더를 가져오거나 설정합니다.

public:
 property System::String ^ CacheControl { System::String ^ get(); void set(System::String ^ value); };
public string CacheControl { get; set; }
member this.CacheControl : string with get, set
Public Property CacheControl As String

속성 값

String

HttpCacheability 열거형 값의 문자열 표현입니다.

예외

설정된 문자열 값이 HttpCacheability 열거형 값 중 하나와 일치하지 않는 경우

설명

Public대한 Private값이며 No-Cache 문자열이며 따옴표(" ")로 묶어야 합니다. 속성이 CacheControl 열거형 값 중 하나와 일치하지 않는 값으로 HttpCacheability 설정된 경우 throw ArgumentException 됩니다. 속성이 CacheControl 설정되지 않은 경우 응답의 캐시 가능성은 .로 NoCache설정됩니다.

CacheControl, ExpiresExpiresAbsolute 속성은 더 이상 사용되지 않습니다. 대신 클래스의 HttpCachePolicy 메서드는 내장 개체를 통해 Cache IIS(인터넷 정보 서비스) 출력 캐시 및 클라이언트 캐시를 제어할 수 있습니다.

적용 대상