I use to EntityPDF to create a PDF of a node. The content of the node is set in a function in hook_preprocess_node and the content is used in a custom TWIG template for this node. Everything works fine if I download the document for the first time, however, the PDF gets not re-generated once I download it again. So I think it is a caching problem. I tried to apply a timestamp to the filename pattern, but that did not have any effect. Any ideas how to force the re-creation of the PDF?

Comments

futurmat created an issue. See original summary.

futurmat’s picture

It was a problem with hook_preprocess_node. I set
$variables['#cache']['max-age'] = 0;
and now it always gets re-created.

futurmat’s picture

Status: Active » Closed (works as designed)