Gets or sets the cache expiration behavior that, when combined with the duration, describes the behavior of the cache that the data source control uses.
Documentation for this section has not yet been entered.
The System.Web.UI.WebControls.ObjectDataSource control supports data caching. While data is cached, calls to the ObjectDataSource.Select method retrieve data from the cache rather than from the business object that the System.Web.UI.WebControls.ObjectDataSource works with. When the cache expires, the ObjectDataSource.Select method retrieves data from the business object, and then caches the data again.
The System.Web.UI.WebControls.ObjectDataSource control automatically caches data when the ObjectDataSource.EnableCaching property is set to true and the ObjectDataSource.CacheDuration property is set to a value greater than 0, which indicates the number of seconds that the cache stores data before the cache entry is discarded. A value of 0 indicates an infinitely long cache period.
The cache is regulated by a combination of the duration and the ObjectDataSource.CacheExpirationPolicy setting. If the ObjectDataSource.CacheExpirationPolicy property is set to the System.Web.UI.DataSourceCacheExpiry.Absolute value, the System.Web.UI.WebControls.ObjectDataSource caches data on the first call to the ObjectDataSource.Select method and holds it in memory for, at most, the amount of time that is specified by the ObjectDataSource.CacheDuration property. The data might be released before the duration time, if the memory is needed. The cache is then refreshed during the next call to the ObjectDataSource.Select method. If the ObjectDataSource.CacheExpirationPolicy property is set to the System.Web.UI.DataSourceCacheExpiry.Sliding value, the data source control caches data on the first call to the ObjectDataSource.Select method, but resets the time window for which it holds the cache for each subsequent call to the ObjectDataSource.Select method. The cache expires if there is no activity for a time that is equal to the ObjectDataSource.CacheDuration property since the last call to the ObjectDataSource.Select method.