PHP 클래스 Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy

Pay attention to share storage between application with caution! For example, a response with cache-control header "private, max-age=60" will be cached by this strategy. The rules applied are from RFC 7234.
또한 보기: https://tools.ietf.org/html/rfc7234
상속: implements Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface
파일 보기 프로젝트 열기: kevinrob/guzzle-cache-middleware 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$ageKey string[]
$statusAccepted int[]
$storage Kevinrob\GuzzleCache\Storage\CacheStorageInterface

공개 메소드들

메소드 설명
__construct ( Kevinrob\GuzzleCache\Storage\CacheStorageInterface $cache = null )
cache ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : boolean
fetch ( Psr\Http\Message\RequestInterface $request ) : CacheEntry | null Return a CacheEntry or null if no cache.
update ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : boolean

보호된 메소드들

메소드 설명
getCacheKey ( Psr\Http\Message\RequestInterface $request ) : string
getCacheObject ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : CacheEntry | null

메소드 상세

__construct() 공개 메소드

public __construct ( Kevinrob\GuzzleCache\Storage\CacheStorageInterface $cache = null )
$cache Kevinrob\GuzzleCache\Storage\CacheStorageInterface

cache() 공개 메소드

public cache ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : boolean
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
리턴 boolean true if success

fetch() 공개 메소드

Return a CacheEntry or null if no cache.
public fetch ( Psr\Http\Message\RequestInterface $request ) : CacheEntry | null
$request Psr\Http\Message\RequestInterface
리턴 Kevinrob\GuzzleCache\CacheEntry | null

getCacheKey() 보호된 메소드

protected getCacheKey ( Psr\Http\Message\RequestInterface $request ) : string
$request Psr\Http\Message\RequestInterface
리턴 string

getCacheObject() 보호된 메소드

protected getCacheObject ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : CacheEntry | null
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
리턴 Kevinrob\GuzzleCache\CacheEntry | null entry to save, null if can't cache it

update() 공개 메소드

public update ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : boolean
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
리턴 boolean true if success

프로퍼티 상세

$ageKey 보호되어 있는 프로퍼티

protected string[] $ageKey
리턴 string[]

$statusAccepted 보호되어 있는 프로퍼티

protected int[] $statusAccepted
리턴 int[]

$storage 보호되어 있는 프로퍼티

protected CacheStorageInterface,Kevinrob\GuzzleCache\Storage $storage
리턴 Kevinrob\GuzzleCache\Storage\CacheStorageInterface