Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

cache trong mvc

DataSet ds = System.Web.HttpContext.Current.Cache["CacheName"] as DataSet;
if (ds == null)
{
ds = CategoryDB.GetLastestNews(CategoryID, NoOfNews, LanguageCode);
System.Web.HttpContext.Current.Cache.Insert("CacheName", ds, null, DateTime.MaxValue, TimeSpan.FromMinutes(15));
}
Source by viblo.asia #
 
PREVIOUS NEXT
Tagged: #cache #trong #mvc
ADD COMMENT
Topic
Name
3+5 =