RcBuilder@walla.com
call centre: 054-5614020

HttpRuntime Cache with dictionary

Posted by: RcBuilder  /   Category: Cache / Dictionary / Linq / SOURCE CODE   /   2 Comments
04
May
2014

HttpRuntime.Cache with dictionary public Group GetGroupCache(string groupName) { Dictionary<string, Group> groups = null; string CACHE_KEY = "MT4_GROUPS"; if (HttpRuntime.Cache == null) { var temp = GetGroups(); if (temp.Count > 0) { groups = temp.ToDictionary(x => x.Name, x => x); HttpRuntime.Cache.Add(CACHE_KEY, groups, null, DateTime.Now.AddHours(3), TimeSpan.Zero, CacheItemPriority.High, null); } } else groups = (Dictionary<string, Group>)HttpRuntime.Cache; return groups; } // need to implement  Group.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים