2013年1月4日

摘要: MVC中OutputCache的用法[OutputCache(Duration = 10, VaryByParam ="none")]publicActionResultIndex(){ViewData["Time"] =DateTime.Now;returnView();}以上代码的意思就是说在10秒以内,数据是从缓存里面读取也可以使用配置文件来做,这样更便于管理,如下:[OutputCache(CacheProfile ="MyProfile")]publicActionResultIndex(){ViewData["T 阅读全文
posted @ 2013-01-04 10:54 宋时明月 阅读(174) 评论(0) 推荐(0) 编辑

导航