|
|
 Rank: Enthusiast
Joined: 5/28/2008 Posts: 45 Location: Bristol, UK
|
Hi all, Long time lurker, first time caller... got a question about the caching mechanism built in the macros. I've read through another post about general caching in Umbraco, which all makes sense. I'm still confused about the "Cache By Page" option in the macro settings. Does it cache the output of the macro by .aspx page? or by full URL? (including QueryString params) Also does it make any difference to the caching if I use a .NET control or XSLT? (or Python for that matter? - does anyone actually use Python?) Thanks, - Lee PS. I've been helping ProNotion out with his Umbraco problems, and I've promised him that I'd get more involved in the community/forums, etc. http://leekelleher.com/
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 671 Location: Preston, UK
|
Aye up Lee,
Not sure about the first bit but the .net macro caching has issues the xslt caching works nicely. Also with regards to macros i go by the rule of thumb (picked this up at level2 course many moons ago) :
If displaying content use xslt. If taking user input use .net macro.
Regards
Ismail
Level 2 certified. If it aint broke dont fix.
|
|
 Rank: Enthusiast
Joined: 5/28/2008 Posts: 45 Location: Bristol, UK
|
imayat12 wrote:If displaying content use xslt. If taking user input use .net macro. Hi Ismail, Good rule of thumb! I'll keep that in mind for this project I'm working on. I'll play around with the macro caching, see what I can find out - just thought someone might already know. Cheers, - Lee http://leekelleher.com/
|
|
 Rank: Enthusiast
Joined: 5/28/2008 Posts: 45 Location: Bristol, UK
|
Just to follow up on my original question... I found that "Cache by Page" does not include the querystring params in the URL (so, if enabled, changing any querystring values wont change the macro). Since I needed to cache the macro by the full URL (including querystring params), I ended up using a UrlRewriting rule - so that the URL would appear as an .aspx page. I haven't done any extensive research on this... just what I've noticed whilst I've been developing on recent Umbraco projects. Cheers, - Lee http://leekelleher.com/
|
|
|
Guest |