Silex offers the ability to automatically use CRSF protection for forms. The problem is that when using the provided HttpCacheProvider cache is impossible not to cache the token generated, so the solution is to use esi, but I can't make it work. I tried with 2 actions, one with the twig containing the esi code and the form._token to render the CRSF token:
<esi:include src="/form" />
{{ form_row(form._token) }}
and the action "form" containing the rest of the form, but now the validation errors are not displayed. Is this even possible to do? Is it the right way?