Свойство | Тип | Описание | |
---|---|---|---|
$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 中加入时间戳,以阻挡网络传输中可能存在的缓存 |
Метод | Описание | |
---|---|---|
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 ) |
Метод | Описание | |
---|---|---|
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 | |
Результат | boolean |
public static changeJsonpToJson ( $body, $callback ) : string | ||
$body | ||
$callback | ||
Результат | string |
public generateCacheKeys ( Phalcon\Http\Request $request, array $ignores = [] ) : array | ||
$request | Phalcon\Http\Request | |
$ignores | array | |
Результат | array |
public getInterceptorParams ( Phalcon\Mvc\DispatcherInterface $dispatcher ) : array | ||
$dispatcher | Phalcon\Mvc\DispatcherInterface | |
Результат | array |
public injectInterceptor ( Phalcon\Mvc\DispatcherInterface $dispatcher ) : boolean | ||
$dispatcher | Phalcon\Mvc\DispatcherInterface | |
Результат | boolean | true if cache missed(intercepter injected), false if cache hit(intercepter not injected) |
public setCachableHeaderKeys ( array $cachableHeaderKeys ) | ||
$cachableHeaderKeys | array |
protected array $cachableHeaderKeys | ||
Результат | array |
protected string $cacheBodyKey | ||
Результат | string |
protected string $cacheHeadersKey | ||
Результат | string |
protected string $debugQueryKey | ||
Результат | string |