Setting httpCacheVaryByParams="*"

Vote:
 

Hi, 

I want to set uutput cache varybyparam to * . i.e. httpCacheVaryByParams="*" instead of id,epslanguage.  To me it looks ok. Is there anything impact specific to EPiServer CMS 6 R2 that I should consider?

thanks

tepu

#123642
Jul 13, 2015 10:24
Vote:
 
Should the below code in global.asax do the trick 

public
override string GetVaryByCustomString(HttpContext context, string custom) { return context.Request.RawUrl; }

in siteSetting

 httpCacheVaryByParams="some-query-never-used" 

                        
#123643
Jul 13, 2015 11:30
Vote:
 

Hope this will be helpful
http://world.episerver.com/blogs/Magnus-Rahl/Dates/2010/11/Customizing-output-cache-variation/

Regards

/K

#123644
Jul 13, 2015 11:40
Vote:
 

thanks K.

But I want varybyparam  *. My suggested solution works fine. I just want to know If there is any negavtive impact of my suggested solution? 

#123645
Jul 13, 2015 11:47
Vote:
 
  • The primary impact I can think of is memory usage. By varying by "*" you may end up with many different versions of each page so its worth testing this to assess the overall impact.
  • Also output caching this heavily can cause some strange results for instance if you are searching (e.g. /search/?q=searchterm) and the site content changes. The search results may not update immediately which can be confusing for editors.

David

#123646
Jul 13, 2015 12:01
Vote:
 

Cache Efficency cannot be guranted.unique identifier for a specific version of a page in a specific language (combination of the id and epslanguage), is cache key to make sure that each page INDIVIDUALLY have been rendered by ASPX Cache. 

You may also end up that unpublished or old versions of page have also been cached or same page have been cached multiple time.

Regards
/K

#123648
Edited, Jul 13, 2015 12:17
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.