Esempio n. 1
0
 public static void AddRelations(List <EntityRelation> relations)
 {
     AddObjectToCache(KEY_RELATIONS, relations);
     if (relations != null)
     {
         var hash = CryptoUtility.ComputeOddMD5Hash(JsonConvert.SerializeObject(relations));
         AddObjectToCache(KEY_RELATIONS_HASH, hash);
     }
     else
     {
         RemoveObjectFromCache(KEY_RELATIONS_HASH);
     }
 }
Esempio n. 2
0
 public static void AddEntities(List <Entity> entities)
 {
     AddObjectToCache(KEY_ENTITIES, entities);
     if (entities != null)
     {
         var hash = CryptoUtility.ComputeOddMD5Hash(JsonConvert.SerializeObject(entities));
         AddObjectToCache(KEY_ENTITIES_HASH, hash);
     }
     else
     {
         RemoveObjectFromCache(KEY_ENTITIES_HASH);
     }
 }