private static void Remove(PersistableBusinessObject value, object key)
 {
     if (cache != null)
     {
         //remove the fully populated
         cache.Remove(string.Concat(key.ToString(), "|", value.GetType().ToString(), "|", true.ToString()));
         //remove the partially populated
         cache.Remove(string.Concat(key.ToString(), "|", value.GetType().ToString(), "|", false.ToString()));
     }
 }
Beispiel #2
0
        public static void Set <T>(string key,
                                   T value)
        {
            if (_cache.Contains(key))
            {
                _cache.Remove(key);
            }

            if (value != null)
            {
                _cache.Add(key, value);
            }
        }