public static byte[] Serialize(T message) { var key = HashBuilder.GenerateHash <T>(message); byte[] value; if (Cache.TryGetValue(key, out value)) { return(value); } value = SerializerFunc(message); Cache.Add(key, value); return(value); }
public static byte[] Serialize(T message) { var key = HashBuilder.GenerateHash(message); if (Cache.TryGetValue(key, out byte[] value))