在页面头部加入
<%@ OutputCache CacheProfile="AppCache1" VaryByParam="none" VaryByControl="dlstmonth;dlstterm;dlstYear"%>
dlstmonth;dlstterm;dlstYear 分别是三个datalist的控件名称
webconfig中写入
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="AppCache1" enabled="true" duration="60"/>
</outputCacheProfiles>
</outputCacheSettings>
</caching>
测试可以通过datatime.now.second.tostring测缓存时间为60秒