適合ASP.NET MVC的視圖片斷緩存方式(下):頁面輸出原則

上一篇文章裏已經把Html.Cache打造成了非常具有可用性的API,需要緩存時我們只需在頁面上做一個標記即可: <% Html.Cache("cache_key", DateTime.Now.AddSeconds(10), () => { %> <% foreach (var article in Model.Articles) { %> <p><%= articl
相關文章
相關標籤/搜索