You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question for you. I am looking at adding caching of the compiled templates and was wondering if you would like to have it added to the project. I know that folks at zordius/lightncandy have different views on 'compile-on-demand' but their recommended approuch does not work for all cases.
My idea would be to add it as a plugin to \Slim\Views\Lightncandy and would be used by the fetch() method.
What are your thoughts?
The text was updated successfully, but these errors were encountered:
I was only going to cache the compliled templates to help eliminate the effort needed to compile the template. This makes it easy to determine when the cache is stale, basically when the templates modifed timestamp changes.
Caching the results after rendering is better left to an extension in Slim as it can capture the the results of the entire request/results process.
I was planning on making it a simple plugin so that if someone comes up with a different approuch it would be simple to plug it in. It would be more along these lines:
$cache = new \Slim\Views\TemplateCache('path/for/cache');
$view = new \Slim\Views\Lightncandy('path/to/templates');
$view->addCaching($cache);
$app->register($view);
Not quite as eloquent, but most of it would be handled in dependency injection.
Hello @endel,
Question for you. I am looking at adding caching of the compiled templates and was wondering if you would like to have it added to the project. I know that folks at zordius/lightncandy have different views on 'compile-on-demand' but their recommended approuch does not work for all cases.
My idea would be to add it as a plugin to
\Slim\Views\Lightncandy
and would be used by thefetch()
method.What are your thoughts?
The text was updated successfully, but these errors were encountered: