Пример #1
0
        private void RefreshCache()
        {
            var mappings = _repository.All().ToList();

            _getTvdbIdCache.Update(mappings.GroupBy(v => v.ParseTerm).ToDictionary(v => v.Key, v => v.ToList()));
            _findByTvdbIdCache.Update(mappings.GroupBy(v => v.TvdbId).ToDictionary(v => v.Key.ToString(), v => v.ToList()));
        }
Пример #2
0
        private void RefreshCache()
        {
            var mappings = _repository.All();

            _gettvdbIdCache.Clear();
            _getSceneNameCache.Clear();

            foreach (var sceneMapping in mappings)
            {
                _getSceneNameCache.Set(sceneMapping.TvdbId.ToString(), sceneMapping);
                _gettvdbIdCache.Set(sceneMapping.ParseTerm.CleanSeriesTitle(), sceneMapping);
            }
        }
Пример #3
0
        private void RefreshCache()
        {
            var mappings = _repository.All().ToList();

            _getTvdbIdCache.Clear();
            _findByTvdbIdCache.Clear();

            foreach (var sceneMapping in mappings.GroupBy(v => v.ParseTerm))
            {
                _getTvdbIdCache.Set(sceneMapping.Key, sceneMapping.ToList());
            }

            foreach (var sceneMapping in mappings.GroupBy(x => x.TvdbId))
            {
                _findByTvdbIdCache.Set(sceneMapping.Key.ToString(), sceneMapping.ToList());
            }
        }
Пример #4
0
        private void RefreshCache()
        {
            var mappings = _repository.All().ToList();

            _gettvdbIdCache.Clear();
            _findbytvdbIdCache.Clear();

            foreach (var sceneMapping in mappings)
            {
                _gettvdbIdCache.Set(sceneMapping.ParseTerm.CleanSeriesTitle(), sceneMapping);
            }

            foreach (var sceneMapping in mappings.GroupBy(x => x.TvdbId))
            {
                _findbytvdbIdCache.Set(sceneMapping.Key.ToString(), sceneMapping.ToList());
            }
        }