Свойство | Type | Description | |
---|---|---|---|
$cachableHeaderKeys | array | HTTP header keys allow to cache WARNING: DONOT cache Set-Cookies! | |
$cacheBodyKey | string | Cache key for http body | |
$cacheHeadersKey | string | Cache key for http header | |
$debugQueryKey | string | default debug query key, url contains this key will make cache re-genrated | |
$timestampQueryKey | 在 url 中加入时间戳,以阻挡网络传输中可能存在的缓存 |
Méthode | Description | |
---|---|---|
beforeExecuteRoute ( Phalcon\Events\Event $event, Phalcon\Mvc\DispatcherInterface $dispatcher ) : boolean | ||
changeJsonpToJson ( $body, $callback ) : string | Change jsonp string to json | |
generateCacheKeys ( Phalcon\Http\Request $request, array $ignores = [] ) : array | Generate cache key pair (for response header / body) by Host + Uri + Allowed Queries | |
getCachableHeaderKeys ( ) : array | ||
getCacheBodyKey ( ) : string | ||
getCacheHeadersKey ( ) : string | ||
getDebugQueryKey ( ) : string | ||
getInterceptorParams ( Phalcon\Mvc\DispatcherInterface $dispatcher ) : array | Parse Dispatcher params to array | |
injectInterceptor ( Phalcon\Mvc\DispatcherInterface $dispatcher ) : boolean | ||
setCachableHeaderKeys ( array $cachableHeaderKeys ) | ||
setDebugQueryKey ( $debugQueryKey ) |
Méthode | Description | |
---|---|---|
intercept ( Phalcon\Http\Request $request, array $params, Phalcon\Cache\BackendInterface $cache ) : boolean | Intercept a input http request |
public beforeExecuteRoute ( Phalcon\Events\Event $event, Phalcon\Mvc\DispatcherInterface $dispatcher ) : boolean | ||
$event | Phalcon\Events\Event | |
$dispatcher | Phalcon\Mvc\DispatcherInterface | |
Résultat | boolean |
public static changeJsonpToJson ( $body, $callback ) : string | ||
$body | ||
$callback | ||
Résultat | string |
public generateCacheKeys ( Phalcon\Http\Request $request, array $ignores = [] ) : array | ||
$request | Phalcon\Http\Request | |
$ignores | array | |
Résultat | array |
public getInterceptorParams ( Phalcon\Mvc\DispatcherInterface $dispatcher ) : array | ||
$dispatcher | Phalcon\Mvc\DispatcherInterface | |
Résultat | array |
public injectInterceptor ( Phalcon\Mvc\DispatcherInterface $dispatcher ) : boolean | ||
$dispatcher | Phalcon\Mvc\DispatcherInterface | |
Résultat | boolean | true if cache missed(intercepter injected), false if cache hit(intercepter not injected) |
public setCachableHeaderKeys ( array $cachableHeaderKeys ) | ||
$cachableHeaderKeys | array |
protected array $cachableHeaderKeys | ||
Résultat | array |
protected string $cacheBodyKey | ||
Résultat | string |
protected string $cacheHeadersKey | ||
Résultat | string |
protected string $debugQueryKey | ||
Résultat | string |