Macro Parial View always cached (even if caching disabled)
I've got a contact form as Partial View Marcro.
The Macro is always cached, even if i set "Cache by page" to off, "Cache period" to 0 and "Cache personalized" to off.
I see you are using a Macro Partial view. And it seems that you set the caching correctly.
However I don't see how you are rendering it. Are you rendering it self some where in the view. Or does the editor place it in a rich text field or in a grid component.
Maybe publishing the page that shows the macro will solve your problem.
It's rendered via @Model.Value("bodyText") in a child view.
The Macro is inserted in an RichText via Editor...
Publishing the containing page, invalidates the Cache only one time. Same Code worked under UMB7.
For me the problem is with reading cookies from macro. I delete or add cookies through javascript and when going to cart page I am using the macro to list all added items from cookie. If I recycle app pool everything works as expected, but if then I delete one item the cookie changes, but the cart page doesn't read the cookie again on refresh.
This post was the most similar issue as mine. I don't know if I didn't search the issues page enough but didn't find that is it resolved or closed.
If someone has a link to issue I would be very thankful, if not that's also good cause I will open the issue then :)
Macro Parial View always cached (even if caching disabled)
I've got a contact form as Partial View Marcro. The Macro is always cached, even if i set "Cache by page" to off, "Cache period" to 0 and "Cache personalized" to off.
Sample cshtml:
Result: Same Number, when accessing the page.
Hi Enny
Can you show the master page view? Maybe caching is on the page level?
Alex
Thank you! Here is the master:
Hi Enny,
I see you are using a Macro Partial view. And it seems that you set the caching correctly.
However I don't see how you are rendering it. Are you rendering it self some where in the view. Or does the editor place it in a rich text field or in a grid component.
Maybe publishing the page that shows the macro will solve your problem.
Dave
It's rendered via @Model.Value("bodyText") in a child view. The Macro is inserted in an RichText via Editor... Publishing the containing page, invalidates the Cache only one time. Same Code worked under UMB7.
Hi Enny,
If it reproducable it's best to create a issue at : https://github.com/umbraco/Umbraco-CMS/issues
Please describe the steps on how to reproduce. Include as much information as possible.
Dave
Thank you Dave and Alex!
Hello all,
I have a similar issue but didn't find any open or closed issue on https://github.com/umbraco/Umbraco-CMS/issues
For me the problem is with reading cookies from macro. I delete or add cookies through javascript and when going to cart page I am using the macro to list all added items from cookie. If I recycle app pool everything works as expected, but if then I delete one item the cookie changes, but the cart page doesn't read the cookie again on refresh.
This post was the most similar issue as mine. I don't know if I didn't search the issues page enough but didn't find that is it resolved or closed.
If someone has a link to issue I would be very thankful, if not that's also good cause I will open the issue then :)
is working on a reply...