private void UpdateCache(Guid clubId) { var terms = evaluationQuery.GetTerms(clubId); cache.Remove(CacheKeys.TERM_LIST); MemoryCacheEntryOptions options = new MemoryCacheEntryOptions() { SlidingExpiration = TimeSpan.FromMinutes(10) }; cache.Set(cacheKey, terms, options); }
public IActionResult Terms() { var terms = evaluationQuery.GetTerms(club.Guid); return(View(terms)); }
private bool HasExistingOpenTerms(Guid clubId, Guid?ignoredTermId = null) { var openTerms = evaluationQuery.GetTerms(clubId, status: TermStatus.Open); return(ignoredTermId.HasValue ? openTerms.Any(t => t.Guid != ignoredTermId.Value) : openTerms.Any()); }