Suppose you have a very hard to render component that shows the News.
Its content don't need to be refreshed everytime an user access to the site.
You can ask the component to refresh every 5 minutes instead of refreshing it every time an user access to the site.
If any user access before these 5 minutes, he is going to get the cached version (static html output) of the component instead of rendering it again.

Developers

License

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Changelog for release 1.0.2 - 29/11/2010

Other releases

Release 1.0.2 - 29/11/2010

Release 1.0.1 - 29/11/2010

Release 1.0.0 - 29/11/2010

RosfEsiSimulatorPlugin

It renders components, partials or any piece of code you need to speed up,
the same way as it would be if you were using Edge-Side Includes (ESI).

Example:
Suppose you have a very hard to render component that shows the News.
Its content don't need to be refreshed everytime an user access to the site.
You can ask the component to refresh every 5 minutes instead of refreshing it every time an user access to the site.
If any user access before these 5 minutes, he is going to get the cached version (static html output) of the component instead of rendering it again.

First of all, it's not ESI actually, because it doesn't use the ESI tags, it's just a very simple implementation of the Edge-Side Includes behavior so it's handled by symfony.

It was inspired by the ESI implementation in Symfony2, but i needed it for symfony 1.4 and 1.2.
http://docs.symfony-reloaded.org/master/guides/cache/http.html#using-edge-side-includes

INSTALLATION

Enable The plugin

Add to "standard_helpers" in settings.yml the following helpers:

Partial # if it's not enabled already

Esisimulator

Using the symfony Standard helpers include_component and include_partial

Now, you'll have to use helpers: include_component_esi and include_partial_esi.
If you don't want to use these helpers, and you want to use include_component and include_partial, there is one more step:
(This is very nasty by the way)

You can rename PartialHelper.php-dist PartialHelper.php to inside the plugin directory.
Sorry for that, but i couldn't find a better way to decorate helpers with symfony

Configuring

Suppose you have this line:

include_component_esi('module1', 'component1');

or

include_component('module1', 'component1'); //if you use PartialHelper.php Included in this plugin