Method | Description | |
---|---|---|
isValidCache ( string $cacheKey ) : boolean | Returns whether this cache is valid(exists) or not. | |
renderCached ( string $cacheKey, string $view, array | callable $data = null ) : string | Returns a rendered view. If we find data behind the given cache it uses this data instead of calling $data. So this function does not cache the whole rendered html. To do so use renderFullCache(). | |
renderFullCached ( string $cacheKey, string $view, array | callable $data = null, integer $lifeTime = null, boolean $force = false ) : string | Returns a rendered view. If we find html behind the given cache it returns this directly. This is a couple os ms faster than renderCached since the template engine is never used when there's a valid cache. | |
renderPluginView ( string $view, array $parameters = [] ) : string | Renders a view and wrap it with a PluginResponse, so the result will be rendered at the plugin's position. | |
setOptions ( array &$values, array $defaults ) | Replaces all falsy (0, '', null) values in $values with the $default value. |
protected isValidCache ( string $cacheKey ) : boolean | ||
$cacheKey | string | |
return | boolean |
protected renderFullCached ( string $cacheKey, string $view, array | callable $data = null, integer $lifeTime = null, boolean $force = false ) : string | ||
$cacheKey | string | |
$view | string | |
$data | array | callable | Pass the data as array or a data provider function. |
$lifeTime | integer | In seconds. Default is one hour/3600 seconds. |
$force | boolean | Force to bypass the cache and always call $data. For debuggin purposes. |
return | string |
protected setOptions ( array &$values, array $defaults ) | ||
$values | array | |
$defaults | array |