This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

yfktn
yfktn

Hi, I've developed plugin to use twig cache extension in our OctoberCMS theme.

Using this extension we can surround the code with a cache block, at the part you want to cache.

{# add homepage annotation with time strategy, for 10 seconds #}
{% cache "homepage" {time: 10} %}
    {# heavy lifting template stuff here, include/render other partials etc #}
{% endcache %}

Beware though, this plugin still in the early stage of development, even if I've used it in the one of our websites. The repository is at https://github.com/yfktn/twigcache-plugin.

JenniferLopez
yfktn
yfktn

Thank you ... I've made it easier to install using composer, compared with the previous version which need git clone command to install.

$ composer require yfktn/twigcacheplugin

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.