PHP 클래스 Webiny\Component\Http\Response\CacheControl

상속: use trait Webiny\Component\StdLib\StdObjectTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( ) Base constructor.
getCacheControl ( ) : array Returns the current cache control headers as an array.
setAsCache ( DateTimeObject $expirationDate ) Populates the cache control headers with options so that the browser caches the content.
setAsDontCache ( ) Populates the current cache control headers with options so the content is not cached by the browser.
setCacheControl ( array $cacheControl ) Overwrites the current cache control headers.
setCacheControlEntry ( string $key, string $value ) Sets or adds an entry to cache control headers.

비공개 메소드들

메소드 설명
validateCacheControlHeader ( string $header ) : boolean Checks if the give header name is a valid cache control header.

메소드 상세

__construct() 공개 메소드

Base constructor.
public __construct ( )

getCacheControl() 공개 메소드

Returns the current cache control headers as an array.
public getCacheControl ( ) : array
리턴 array

setAsCache() 공개 메소드

Populates the cache control headers with options so that the browser caches the content.
public setAsCache ( DateTimeObject $expirationDate )
$expirationDate Webiny\Component\StdLib\StdObject\DateTimeObject\DateTimeObject Defines the date when the cache should expire.

setAsDontCache() 공개 메소드

These headers are returned with each response by default.
public setAsDontCache ( )

setCacheControl() 공개 메소드

Overwrites the current cache control headers.
public setCacheControl ( array $cacheControl )
$cacheControl array Array containing new cache control headers.

setCacheControlEntry() 공개 메소드

Sets or adds an entry to cache control headers.
public setCacheControlEntry ( string $key, string $value )
$key string Cache control header name.
$value string Cache control header value.