CacheByPage and umbraco:macro using filelocation not alias name
Hi
I've got a site setup using macros and razor but when I switch caching on for the macros initially they all got confused.
I realised
that the key for caching is the alias name so for each macro included on a page I added an alias and they all started behaving again.
Unfortunately
I then found that each macro only got cached when first processed so if a macro was used throughout the site and it was first created on the home page the bread crumb would only ever show as if it was on the home page.
I researched and worked out that in the backoffice there is an additional setting Cache By Page which i had not added in my macro include.
I attempted to add an attribute CacheByPage="true" however this does not seem to work.
Does anyone know how to make macros using filelocation cache by the page?
The release notes for today's Umbraco 4.7.2 release mention "patch release fixing several bugs including major issues with Razor caching". Might this have fixed the problems?
CacheByPage and umbraco:macro using filelocation not alias name
Hi
I've got a site setup using macros and razor but when I switch caching on for the macros initially they all got confused.
I realised that the key for caching is the alias name so for each macro included on a page I added an alias and they all started behaving again.
Unfortunately I then found that each macro only got cached when first processed so if a macro was used throughout the site and it was first created on the home page the bread crumb would only ever show as if it was on the home page.
I researched and worked out that in the backoffice there is an additional setting Cache By Page which i had not added in my macro include.
I attempted to add an attribute CacheByPage="true" however this does not seem to work.
Does anyone know how to make macros using filelocation cache by the page?
Cheers
Sorry, I have no idea, I hardly ever use caching because my sites are wonderfully fast already. But it sounds like a bug if it doesn't work.
Also, I'm not sure know what the exact attributes are so you might want to dive into the source to check if it exists and if you didn't misspell it.
So my only advise for now is: Create a proper macro and set check ON Cache by Page there.
Thanks Sebastiaan
I've had a dig in the code and in the macro.cs there is no reference to Cache By Page which is a bit of a pain.
Unfortunatley when you're calling external sources you can't control how fast they respond with the data so caching is the only option for this :(
I'll try and find time to log this on the Issue tracker and maybe edit the code so it works.
Hi Jon,
The release notes for today's Umbraco 4.7.2 release mention "patch release fixing several bugs including major issues with Razor caching". Might this have fixed the problems?
Steve.
is working on a reply...