예제 #1
0
        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);
        }
예제 #2
0
        public IActionResult Terms()
        {
            var terms = evaluationQuery.GetTerms(club.Guid);

            return(View(terms));
        }
예제 #3
0
        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());
        }