/****************************** * 说明:运行时缓存(下一步数据存放本地版本号控制) * 创建人:龚宇超 * 创建日期:2019-06-10 * 修改人: * 修改日期: * 修改备注: * 版本:1.0.0.0 ******************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Lskj.Util { /// /// 运行时缓存 /// public static class CacheHelper { //缓存容器 private static Dictionary mCacheDictionary = new Dictionary(); /// /// 添加缓存 /// public static void Add(string key, object value) { mCacheDictionary.Add(key, value); } /// /// 获取缓存 /// public static T Get(string key) { return (T)mCacheDictionary[key]; } /// /// 判断缓存是否存在 /// /// /// public static bool Exsits(string key) { return mCacheDictionary.ContainsKey(key); } } }