예제 #1
0
        public async static System.Threading.Tasks.Task <bool> Back(Env env)
        {
            while (true)
            {
                var bl = new BL();
                bl.id = ID;
                foreach (var r in cache.ToList())
                {
                    bl.v.Add(r.Key, r.Value);
                }
                foreach (var r in kw)
                {
                    bl.off.Add(r.Key, r.Value.AbsoluteExpiration);
                }

                var doc = BsonMapper.Global.ToDocument <BL>(bl);
                env.Engine.Upsert("ky", doc);
                await System.Threading.Tasks.Task.Delay(1000);
            }
        }