internal void AddToCache(bool localOnly, string key, byte[] value) { // Sanity check everything first. if (String.IsNullOrEmpty(key)) { throw new ArgumentException("The key cannot be null", "key"); } if (value == null || value.Length == 0) { throw new ArgumentException("The entry to the cache cannot be null", "value"); } ClientResultMessage msg = new ClientResultMessage { Data = value, Key = key }; // Update ResultCache.Write(key, msg, localOnly); }