public void TestCacheCaseInsensitivity() { using (AnimeListCache cache = new AnimeListCache(expiration: TimeSpan.FromHours(5))) { cache.PutListForUser("a", new MalUserLookupResults(userId: 5, canonicalUserName: "******", animeList: new List<MyAnimeListEntry>())); MalUserLookupResults lookup; cache.GetListForUser("A", out lookup); Assert.That(lookup.UserId, Is.EqualTo(5)); } }
public CachingMyAnimeListApi(IMyAnimeListApi underlyingApi, TimeSpan?expiration, bool ownApi = false) { m_underlyingApi = underlyingApi; m_ownUnderlyingApi = ownApi; m_cache = new AnimeListCache(expiration); }