示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ////获取缓存
            //var user = CacheHelper.Get("user");
            ////清除缓存
            //CacheHelper.Remove("user");
            //获取缓存
            var user = CacheHelperBeta.Get("user");

            //清除缓存
            CacheHelperBeta.Remove("user");
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            GridView1.DataSource = DbHelperSQL.GetDataTable("SELECT TOP 10 TypeID,TypeName,TypePrice,AddBedPrice,IsAddBed,Remark FROM RoomType");
            GridView1.DataBind();
            //记录缓存
            //var user = new User(DateTime.Now,1,"Cheng");
            //CacheHelper.Insert("user", user);

            //记录缓存
            var user = new XUser(1, "Cheng", 18);

            CacheHelperBeta.Insert("user", user);
        }