This option is similar to the Session option in that the view state is saved in the cache on the application server. The advantages and disadvantages are almost the same as well. One additional advantage of the cache option is that you can have more control over when view state data expires. The following choices are available for cache expiration:
Key dependency: Items in the application cache are stored in key/value pairs. Key dependency allows an item to be dependent on the key of another item in the application cache. When the original item is removed, the item that has the key dependency is also removed. For example, you could add a cache item named ReportsValid and then cache several reports that are dependent on the ReportsValid key. When the ReportsValid item is removed, all dependent cached reports are likewise removed from the cache.
File dependency: An item in the cache is dependent on an external file. If the file is modified or deleted, the cached item is removed.
SQL dependency: An item in the cache is dependent on changes in a table in a Microsoft SQL Server 2005, SQL Server 2000, or SQL Server 7.0 database. For Microsoft SQL Server 2005, an item can be dependent on a row in a table. For more information, search for Caching in ASP.NET with the SqlCacheDependency Class on the Web.
Aggregate dependency: An item in the cache is dependent on multiple elements through the use of the AggregateCacheDependency class. If any dependency changes, the item is removed from the cache.
Custom dependency: An item in the cache is configured with a dependency that you create in your own code. For example, you can create a custom Web service cache dependency that removes data from the cache when a call to a Web service results in a particular value.