I try to set the macro cache of one of my usercontrol to 600 seconds. But when I refresh the page the usercontrol didn't display anything. If I use in in my xslt macro, it works fine.
Is it not possible to use it [macro cache] in usercontrol?
Yes, it should be perfectly fine to set macro caching on you usercontrol macros as well as you xslt macros. I can't quite understand why it doesn't work.
Have you seen the free video on umbraco.tv about macro caching, maybe this can help you out a bit? If not you can find id here.
The xslt macro cache is also not working because when I try to use the dropdown, the xslt always returns empty. The xslt requires a querystring which is like this:
Have you declared the two parameters on the macro in the back office?
If you do this, you should be able to chach on parameter-level which I think is the best solution in your situation. You can still grab the parameter values from the url in your first example. Then if you want to cach the macro on parameter level you can insert the macro like this:
The above piece of code will make sure that you are caching the macro depending on the two parameters in your URL. Does this make any sense? And does it help?
using cache in a usercontrol
Hi,
I try to set the macro cache of one of my usercontrol to 600 seconds. But when I refresh the page the usercontrol didn't display anything. If I use in in my xslt macro, it works fine.
Is it not possible to use it [macro cache] in usercontrol?
Sherry
Hi Shery
Yes, it should be perfectly fine to set macro caching on you usercontrol macros as well as you xslt macros. I can't quite understand why it doesn't work.
Have you seen the free video on umbraco.tv about macro caching, maybe this can help you out a bit? If not you can find id here.
/Kim A
Hi Kim,
I already follow it. But it seems the parameter caching is not working. I'm always getting a empty xslt.
Ahh okay, then it's weird. Does the usercontrol require any parameters of any kind to work or so?
/Kim A
The xslt macro cache is also not working because when I try to use the dropdown, the xslt always returns empty. The xslt requires a querystring which is like this:
This xslt filters and display's the different restaurant in our hotel. Base on the value of the variable I will display the list of restaurant.
The problem is I try to add a macro parameter in my xslt and change the above code to
But still I get an empty result in my xslt.
Have you declared the two parameters on the macro in the back office?
If you do this, you should be able to chach on parameter-level which I think is the best solution in your situation. You can still grab the parameter values from the url in your first example. Then if you want to cach the macro on parameter level you can insert the macro like this:
The above piece of code will make sure that you are caching the macro depending on the two parameters in your URL. Does this make any sense? And does it help?
/Kim A
is working on a reply...