//--------------------------------------------------- private static Object getFromContext(String key) { Object obj = ContextCache.Get(key); if (obj != null) { logger.Debug("ctx_cache_get=>" + key); } return(obj); }
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); }
//--------------------------------------------------- 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); }
//--------------------------------------------------- private void addToContext(String key, Object val) { ContextCache.Put(key, val); logger.Debug("ctx_cache_+=>" + key); }
public void Delete(Type t, int id) { ContextCache.Remove(t.FullName, id); }
public IList FindBySql(String sql, Type t) { return(ContextCache.Get(sql) as IList); }