Frank
Frank

Reputation: 2045

VaryByParam in asp.net directive

What does VaryByParam do on an asp.net directive? I have tried looking on the web, but can't actually understand what it does.

Thanks

Upvotes: 1

Views: 1037

Answers (1)

Andrew Hare
Andrew Hare

Reputation: 351536

Please see OutputCacheParameters.VaryByParam:

Gets a comma-delimited list of query string or form POST parameters that the output cache uses to vary the cache entry.

Basically what this means is that the output caching of a given page will use certain values to determine which cache should be returned since a dynamic page may have different redered representations of itself.

Those different representations tend to be driven by user-provided data and this property allows you to configure which values from the query string or a POST payload will control that.

Upvotes: 3

Related Questions