Copied to clipboard

Flag this post as spam?

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


  • Andrew Lansdowne 43 posts 124 karma points
    Jul 08, 2010 @ 11:26
    Andrew Lansdowne
    0

    Caching an XSLT macro by querystring

    Hi

    I have an XSLT macro which does things based on querystring values. I'd like to turn on caching for it. When I do, it is cached once and then the cached response is returned when I view with different querystring. Is it possible to cache "per param" like when using VaryByParam="*" in ASP.NET?

    Many thanks,

    Andy

  • David Conlisk 432 posts 1008 karma points
    Jul 08, 2010 @ 18:42
    David Conlisk
    0

    See this free video on Umbraco.tv that explains all about macro caching:

    http://umbraco.org/documentation/videos/for-developers/foundation/macro-caching

    You'll probably need to use macro parameter syntax to pass the querystring item to the macro, rather than reading directly from the querystring in your xslt (e.g. pass [@yourquerystringitemname] to your macro)

    Hope that helps!

    David

  • Andrew Lansdowne 43 posts 124 karma points
    Jul 08, 2010 @ 19:14
    Andrew Lansdowne
    0

    Thanks so much, just what I needed :-)

    Andy

Please Sign in or register to post replies

Write your reply to:

Draft