AddOn for SallyCMS, Edge Side Includes for Sally

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Type:sallycms-addon

dev-default / 0.x-dev 2013-10-07 15:26 UTC

This package is not auto-updated.

Last update: 2020-08-17 09:31:15 UTC


README

1. Usage

sly_Util_ESI::renderTemplate('footer', array('a' => 1), array('max-age' => 10));

The template parameters must be scalars, nested arrays with scalars work too. Just everthing that survives http_build_query

Inside the template you have the local variables $response (sly_Response), $esi (bool) and parameters. Use $response to set the cache directives (ex. $response->addCacheControlDirective('max-age', 300);). $esi is true when the caching works though varnish or sally cache.