- VaryByData: By far the most common VaryBy option, VaryByData adds the data source for the rendering to the cache key. Use VaryByData for renderings that generate different output for different data source items.
- VaryByLogin: Use VaryByUser for renderings that generate different output depending on whether or not the user has authenticated (not on who has authenticated). VaryByLogin tracks only two states: anonymous and authenticated.
- VaryByUser: You can use VaryByUser for renderings that generate different output for different authenticated users (who has authenticated). With very large concurrent user communities, and especially with renderings that can generate a great deal of output, VaryByData can consume significant memory. Consider VaryByUser only for renderings used by a great number of pages with no other caching criteria and do not perform adequately. VaryByUser works only for authenticated users; otherwise, it works like VaryByLogin.
- VaryByParam: If you pass parameters to renderings, you can use VaryByParm to include those parameters in the cache key.
- VaryByDevice: You can use the VaryByDevice option to generate different cache entries for a single rendering invoked in the context of different Sitecore devices (not physical devices, although you could add a custom VaryByPhysicalDevice property).
- VaryByQueryString: You can use the VaryByQueryString option to add all query string keys and values to the cache key. For example, if you use query strings to indicate search parameters, then the output of your search results rendering may VaryByQueryString.
- ClearOnIndexUpdate: Similar to the VaryBy options, ClearOnIndex indicates entries that Sitecore should remove from output caches after search index rebuilding operations complete. You can use the ClearOnIndex attribute for renderings that depend heavily on search that should always present the latest results.