Using an Absolute Cache Expiration Policy
When you use an absolute cache expiration policy, the data that a
DataSource represents is cached in memory for a particular duration of time. Using an absolute cache expiration policy is useful when you know that your data does not change that often. For example, if you know that the records contained in a database table are modified only once a day, there is no reason to keep grabbing the same records each and every time someone requests a web page.
When caching with the
SqlDataSource control, the
DataSourceMode property must be set to the value
DataSet (the default value) rather than
The page in Listing 29.27 displays a list of movies cached in memory. ...