缓存工具类CacheHelper

2017-01-03 11:39:05来源:cnblogs.com作者:秋荷雨翔人点击

代码:

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web;namespace Common.Utils{    /// <summary>    /// 缓存    /// </summary>    public static class CacheHelper    {        /// <summary>        /// 获取缓存        /// </summary>        public static object Get(string cacheKey)        {            return HttpRuntime.Cache[cacheKey];        }        /// <summary>        /// 设置缓存        /// </summary>        public static void Set(string cacheKey, object value)        {            HttpRuntime.Cache.Insert(cacheKey, value);        }    }}

 

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台