public async Task <Unit> Handle(ClearCacheCommand request, CancellationToken cancellationToken) { await cacheRepository.Clear(); await poeNinjaRepository.Clear(); return(Unit.Value); }
public static void FillCache(string xmlPath, ICacheRepository cacheRepository) { var parser = new XmlParser(xmlPath); var modules = parser.ParseXml(); var tableOfContents = new TableOfContents(modules); cacheRepository.Clear(); // By convention, the table of contents is always situated at Guid.Empty. cacheRepository.Put(CourseService.TableOfContentsKey, tableOfContents); foreach (var lesson in modules.SelectMany(x => x.Lessons)) cacheRepository.Put(lesson.Id, lesson); }
public static void FillCache(string xmlPath, ICacheRepository cacheRepository) { var parser = new XmlParser(xmlPath); var modules = parser.ParseXml(); var tableOfContents = new TableOfContents(modules); cacheRepository.Clear(); // By convention, the table of contents is always situated at Guid.Empty. cacheRepository.Put(CourseService.TableOfContentsKey, tableOfContents); foreach (var lesson in modules.SelectMany(x => x.Lessons)) { cacheRepository.Put(lesson.Id, lesson); } }
public void Clear() { _layer2Repository.Clear(); _layer1Repository.Clear(); Publish(default(TKey)); }
/// <summary> /// Clear the Cache /// </summary> /// <exception cref="T:NHibernate.Cache.CacheException"/> public void Clear() { Repository.Clear(); }
public void Clear() { _cacheRepo.Clear(); }
// EntityのOnSubmitのコールバック用に、cacheをクリアする関数を返す private Func <Task> ClearCacheOnSubmit(DbContext dbContext, TEntity entity) { var keys = dbContext.FindPrimaryKeyValues(entity); return(() => cacheRepository.Clear(keys)); }
public void Clear() { _cacheRepository.Clear(); }
/// <summary> /// 비동기 방식으로 캐시에 저장된 모든 정보를 삭제합니다. /// </summary> /// <param name="repository"></param> /// <returns></returns> public static Task ClearAsync(this ICacheRepository repository) { return(Task.Factory.StartNew(() => repository.Clear())); }