Example #1
0
        //---------------------------------------------------

        private static Object getFromContext(String key)
        {
            Object obj = ContextCache.Get(key);

            if (obj != null)
            {
                logger.Debug("ctx_cache_get=>" + key);
            }
            return(obj);
        }
Example #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);
 }
Example #3
0
        //---------------------------------------------------

        private void addToContext(String key, Object val)
        {
            ContextCache.Put(key, val);
            logger.Debug("ctx_cache_+=>" + key);
        }
Example #4
0
 public void Delete(Type t, int id)
 {
     ContextCache.Remove(t.FullName, id);
 }
Example #5
0
 public IList FindBySql(String sql, Type t)
 {
     return(ContextCache.Get(sql) as IList);
 }