private static string GetCache(string key) { var md5Key = SSSecurity.GetMD5(key); var cacheResult = MCache[md5Key]; return(cacheResult != null?cacheResult.ToString() : null); }
private static void SaveCache(string key, string value, int cacheDay) { var md5Key = SSSecurity.GetMD5(key); var cacheResult = MCache[md5Key]; if (cacheResult != null) { MCache.Remove(md5Key); } MCache.Add(md5Key, value, DateTime.Now.AddDays(cacheDay)); }