I am currently developing a WEB site on symfony 6 and during production testing I have a problem with the TWIG cache. Indeed, my site includes a page editing feature. So when rendering the first time, the page is rendered correctly. However, if the editor then modifies the page, and I return to the page is still the old version. Is there a way to integrate a cache check, for example it looks at the hash of the loaded template has not changed?
How is the page loaded:
{% extends 'base.html.twig' %}
{% block title %}
{{project.libelle}}
{% endblock %}
{% block content %}
<div class="content">
{{ckRender(include("dynamique/" ~ project.page.filename))}}
</div>
{% endblock %}
Thank you for your help