Exemple #1
0
        //---------------------------------------------------

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

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

        private static Object getFromContext(String key)
        {
            Object obj = null;

            try
            {
                obj = ContextCache.Get(key);
            }
            catch { }
            if (obj != null)
            {
                logger.Info("ctx_cache_get=>" + key);
            }
            return(obj);
        }
Exemple #4
0
        //---------------------------------------------------

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