Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string key = Request.QueryString["key"];
            //var val = (List<string>)CacheHelper2.GetCache(key);
            var val = (String)CacheHelper2.GetCache(key);

            //var str=Newtonsoft.Json.JsonConvert.SerializeObject(val);

            Response.Write("{'val':'" + val + "'}");
            Response.Flush();
            Response.End();
        }
Ejemplo n.º 2
0
        private void DoWork2()
        {
            //List<string> stu = null;
            DateTime starttime = DateTime.Now;

            for (int i = 1; i <= 100000; i++)
            {
                CacheHelper2.GetCache("stu" + i);
                if (i % (100000 / 100) == 0)
                {
                    Session["count12"] = "{'curr':'" + (i / (100000 / 100)).ToString() + "','time':'" + (DateTime.Now - starttime) + "'}"; //反馈当前任务状态
                }
            }
        }