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?
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)
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
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
Thanks so much, just what I needed :-)
Andy
is working on a reply...