ResponseCacheAttribute 클래스

정의

응답 캐싱에서 적절한 헤더를 설정하는 데 필요한 매개 변수를 지정합니다.

public ref class ResponseCacheAttribute : Attribute, Microsoft::AspNetCore::Mvc::Filters::IFilterFactory, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class ResponseCacheAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ResponseCacheAttribute = class
    inherit Attribute
    interface IFilterFactory
    interface IFilterMetadata
    interface IOrderedFilter
Public Class ResponseCacheAttribute
Inherits Attribute
Implements IFilterFactory, IOrderedFilter
상속
ResponseCacheAttribute
특성
구현

생성자

ResponseCacheAttribute()

응답 캐싱에서 적절한 헤더를 설정하는 데 필요한 매개 변수를 지정합니다.

속성

CacheProfileName

캐시 프로필 이름의 값을 가져오거나 설정합니다.

Duration

응답이 캐시되는 기간(초)을 가져오거나 설정합니다. 이렇게 하면 "Cache-control" 헤더에서 "max-age"가 설정됩니다.

IsReusable

의 결과를 CreateInstance(IServiceProvider) 요청 간에 재사용할 수 있는지를 나타내는 값을 가져옵니다.

Location

특정 URL의 데이터를 캐시해야 하는 위치를 가져오거나 설정합니다.

NoStore

데이터를 저장해야 하는지 여부를 결정하는 값을 가져오거나 설정합니다. 로 true설정하면 "Cache-control" 헤더를 "no-store"로 설정합니다. "None" 이외의 값에 대해 "Location" 매개 변수를 무시합니다. "duration" 매개 변수를 무시합니다.

Order

필터 실행 순서를 결정하는 순서 값을 가져옵니다. 필터는 속성의 오름차순 숫자 값으로 Order 실행됩니다.

VaryByHeader

Vary 응답 헤더의 값을 가져오거나 설정합니다.

VaryByQueryKeys

다양한 쿼리 키를 가져오거나 설정합니다.

메서드

CreateInstance(IServiceProvider)

실행 필터의 instance 만듭니다.

GetCacheProfile(MvcOptions)

이 특성에 CacheProfile 대한 를 가져옵니다.

적용 대상