namespace Toolkit.Foundation; public interface ICache : IEnumerable { void Add(TValue value); void Clear(); int IndexOf(TValue value); bool Remove(TValue value); bool TryGetValue(TValue key, out TValue? value); } public interface ICache : IEnumerable> where TKey : notnull where TValue : notnull { void Add(TKey key, TValue value); void Clear(); bool ContainsKey(TKey key); int IndexOf(TKey key); bool Remove(TKey key); bool TryGetValue(TKey key, out TValue? value); }