public async Task UpdateOrCreateCacheEntry(PodcastId id, CacheInfo entry) { FileModel existingEnry; if (!_memCache.TryGetValue(id, out existingEnry)) { var fileModel = new FileModel(id, entry); _memCache.Add(id, fileModel); _cachedFiles.OnNext(fileModel); } else { existingEnry.UpdateCachingState(entry); } await Cache.Local.InsertObject(id.Url, entry); }
public void UpdateCachingState(CacheInfo entry) { //State }