On 30-06-2010 at 16:46:43 Bas <kooy...@hotmail.com> wrote:

I implemented the solution, but now the macro is cached and I don't know how to specify that it should not be cached.
I already added a tal:cache attribute to the define macro tag, like this:

<tal:block metal:define-macro="contentGenerated"
tal:cache="100d per article/getDateContentModified" />

But no matter what I put in the tal:cache attribute, I still get the same output as when I first executed the macro. I am sure the content of the article changed, if I just echo the content in the resolve function I do see the modified content.

Does it work without tal:cache?

Is the problem in caching values of variables, or do you change source code of the template and it's not updated?

If unchanging source code is the problem, then when you create PHPTAL_StringSource _don't_ specify path parameter (it's used for caching, without it md5 of template is used) or implement your own PHPTAL_Source class that has getLastModifiedTime() method.

regards, Kornel

PHPTAL mailing list

Reply via email to