0

Came across to this defect with ASP.NET RC refresh while using VaryByParam="" instead of VaryByParam="None".

Caching WORKS, but page http://www.yoursite.com and http://www.yoursite.com/home/index will be cached separately it seems.

What is the difference between VaryByParam="" and VaryByParam="None"?

edit : I mean VaryByParam="" not VaryByParam="*" cause the bug still exists with VaryByParam="*"

Community
  • 1
  • 1

2 Answers2

5

VaryByParam="*" will create a new cache for every different parameter passed.
VaryByParam="None" will create one and only one cache, regardless of parameters.

Chad Moran
  • 12,834
  • 2
  • 50
  • 72
  • I meant VaryByParam="" not VaryByParam="*" cause the bug still exists with VaryByParam="*" –  Mar 03 '09 at 16:02
  • Instead of using VaryByParam="None" I suggest to use VaryByParam="" (empty string). Otherwise the cache will create a new entry if the user specify the `None` parameter. – Davide Icardi Oct 02 '13 at 14:16
2

Route elements are not considered parameters for OutputCache.

What is VaryByParam in asp.net?

Community
  • 1
  • 1
vtortola
  • 34,709
  • 29
  • 161
  • 263