Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nikolaj Hjelm Kaplan 1 post 21 karma points
    Aug 22, 2013 @ 16:19
    Nikolaj Hjelm Kaplan
    0

    Turn off caching if content is dynamic

    Hi

    I have a macro that renders a rich text field. Most of the pages that uses the template that contains this macro, should be completely cached. But on some pages the editors will be inserting contour forms (or other dynamic content) into the rich text field. In this case I do not want the content to be cached.

    So in short. Is it possible to automatically disable the cache of pages when the content of the rich text field is of a certain type? Fx if I can detect that the rich text field contains a contour form?

    Regards,
    Nikolaj

  • Jon Dunfee 199 posts 468 karma points
    Aug 23, 2013 @ 01:39
    Jon Dunfee
    0

    Without writing code, you could have two Macro definitions pointing to the same script; one with cache on and the other off.  If the macros are hard coded in the template then you could wrap the macro with a contentplaceholder and then create a child template of that template with the non-cached macro replacing the content inside the placeholder.  Just have to educate the content contributors to select the non-cached template when dropping in a Contour form.

Please Sign in or register to post replies

Write your reply to:

Draft