Ejemplo n.º 1
0
 public void AddSqlList(String sql, IList objList)
 {
     if (objList == null)
     {
         return;
     }
     addList(sql, objList);
     CacheTime.updateList(sql);
 }
Ejemplo n.º 2
0
 private void addList(String key, IList objList)
 {
     if (objList == null)
     {
         return;
     }
     addToContext(key, objList);
     foreach (IEntity obj in objList)
     {
         ContextCache.Put(CacheKey.getObject(obj.GetType(), obj.Id), obj);
     }
     CacheTime.updateList(key);
 }
Ejemplo n.º 3
0
        private static void addList(String key, IList objList)
        {
            if (objList == null)
            {
                return;
            }

            foreach (IEntity obj in objList)
            {
                addToApplication(CacheKey.getObject(obj.GetType(), obj.Id), obj);
                CacheTime.updateObject(obj);   // 加入缓存的时候,设置最新 timestamp
            }

            List <int> ids = new List <int>();

            foreach (IEntity obj in objList)
            {
                ids.Add(obj.Id);
            }
            addToApplication(key, ids);
            CacheTime.updateList(key);
        }