Skip to content

brandonwestcott/li3_varnish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lithium PHP Plugin for easy Varnish support

Libraries::add('li3_varnish', array(
	'development' => array(
		'esiUrl' => '/esi',
		'defaults' => array(
			'esi' => true,
			'expire' => '+1 days'
		),
		'cache' => array(
			'SomeController::index' => array(
				'expire' => '+2 days',
				'esi' => true,
			),
			'SomeController::show'
		),
	)
));

In the view, you have two options to render items as ESI partials. Either pass in esi = true into the options of a view render, or use the esi helper as a short cut.

<?=$this->_render("element", "login", array(), array('esi' => true)); ?>

or

<?=$this->esi->_render("element", "login"); ?>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages