Cecil logo Cecil
What's on this page

Cache

Cecil uses a cache system to speed up the generation process, it can be disabled or cleared.

There are three cache types involved in template rendering: templates, assets, and translations.

Clear cache

You can clear the cache with the following commands:

php cecil.phar cache:clear               # clear all caches
php cecil.phar cache:clear:assets        # clear assets cache
php cecil.phar cache:clear:templates     # clear templates cache
php cecil.phar cache:clear:translations  # clear translations cache

Fragments cache

Cecil provides a way to cache parts of templates rendering to avoid re-rendering the same partial content multiple times.

To use fragments cache, you must wrap the content you want to cache with the cache tag.

{% cache 'unique-key' %}
  {# cacheable content #}
{% endcache %}

To clear fragments cache only, you can use the following command:

php cecil.phar cache:clear:templates --fragments

Disable cache

You can disable cache with the configuration.