示例#1
0
 public IssueController(
     IIssueDetailsService issueDetailsService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.issueDetailsService = issueDetailsService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }
 public VolumeController(
     IVolumeDetailsService volumeDetailsService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.volumeDetailsService = volumeDetailsService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }
示例#3
0
 public ArcController(
     IArcDetailsService arcDetailsService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.arcDetailsService = arcDetailsService;
     this.cache             = cache;
     this.cacheKeyHolder    = cacheKeyHolder;
 }
 public SeriesController(
     ISeriesDetailsService seriesDetailsService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.seriesDetailsService = seriesDetailsService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }
示例#5
0
        public static void SetIssueDetails(
            this IMemoryCache cache,
            IssueDetailsServiceModel issue,
            ICacheKeyHolderService <int> cacheKeyHolder)
        {
            var cacheOptions = new MemoryCacheEntryOptions()
                               .SetAbsoluteExpiration(TimeSpan.FromMinutes(1));

            cache.Set(GetCacheKey(issue.Id), issue, cacheOptions);

            cacheKeyHolder.AddKey(nameof(IssueDetailsServiceModel), issue.Id);
        }
示例#6
0
        public static void SetSeriesDetails(
            this IMemoryCache cache,
            SeriesDetailsServiceModel series,
            ICacheKeyHolderService <int> cacheKeyHolder)
        {
            var cacheOptions = new MemoryCacheEntryOptions()
                               .SetAbsoluteExpiration(TimeSpan.FromMinutes(3));

            cache.Set(GetCacheKey(series.Id), series, cacheOptions);

            cacheKeyHolder.AddKey(nameof(SeriesDetailsServiceModel), series.Id);
        }
示例#7
0
 public VolumeApiController(
     IVolumeTemplateCreationService volumeTemplateCreationService,
     IVolumeAttachmentService volumeAttachmentService,
     IVolumeDetachmentService volumeDetachmentService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.volumeTemplateCreationService = volumeTemplateCreationService;
     this.volumeAttachmentService       = volumeAttachmentService;
     this.volumeDetachmentService       = volumeDetachmentService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }
示例#8
0
 public ArcApiController(
     IArcTemplateCreationService arcTemplateCreationService,
     IArcAttachmentService arcAttachmentService,
     IArcDetachmentService arcDetachmentService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.arcTemplateCreationService = arcTemplateCreationService;
     this.arcAttachmentService       = arcAttachmentService;
     this.arcDetachmentService       = arcDetachmentService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }
 public IssueApiController(
     IIssueTemplateCreationService issueTemplateCreationService,
     IIssueAttachmentService issueAttachmentService,
     IIssueDetachmentService issueDetachmentService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.issueTemplateCreationService = issueTemplateCreationService;
     this.issueAttachmentService       = issueAttachmentService;
     this.issueDetachmentService       = issueDetachmentService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }
示例#10
0
        public static void RemoveAllArcDetails(this IMemoryCache cache, ICacheKeyHolderService <int> cacheKeyHolder)
        {
            var keys = cacheKeyHolder.GetKeys(nameof(ArcDetailsServiceModel));

            if (keys != null)
            {
                foreach (var key in keys)
                {
                    RemoveArcDetails(cache, key);
                }

                cacheKeyHolder.Clear(nameof(ArcDetailsServiceModel));
            }
        }
示例#11
0
 public ArcController(
     IMapper mapper,
     IGenreRetrievalService genreRetrievalService,
     IArcCreationService arcCreationService,
     IArcDeletionService arcDeletionService,
     IArcEditingInfoService arcEditingInfoService,
     IArcEditingService arcEditingService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.mapper = mapper;
     this.genreRetrievalService = genreRetrievalService;
     this.arcCreationService    = arcCreationService;
     this.arcDeletionService    = arcDeletionService;
     this.arcEditingInfoService = arcEditingInfoService;
     this.arcEditingService     = arcEditingService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }
 public SeriesController(
     IMapper mapper,
     IGenreRetrievalService genreRetrievalService,
     ISeriesCreationService seriesCreationService,
     ISeriesDeletionService seriesDeletionService,
     ISeriesEditingInfoService seriesEditingInfoService,
     ISeriesEditingService seriesEditingService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.mapper = mapper;
     this.genreRetrievalService    = genreRetrievalService;
     this.seriesCreationService    = seriesCreationService;
     this.seriesDeletionService    = seriesDeletionService;
     this.seriesEditingInfoService = seriesEditingInfoService;
     this.seriesEditingService     = seriesEditingService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }
示例#13
0
 public VolumeController(
     IMapper mapper,
     IGenreRetrievalService genreRetrievalService,
     IVolumeCreationService volumeCreationService,
     IVolumeDeletionService volumeDeletionService,
     IVolumeEditingInfoService volumeEditingInfoService,
     IVolumeEditingService volumeEditingService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.mapper = mapper;
     this.genreRetrievalService    = genreRetrievalService;
     this.volumeCreationService    = volumeCreationService;
     this.volumeDeletionService    = volumeDeletionService;
     this.volumeEditingInfoService = volumeEditingInfoService;
     this.volumeEditingService     = volumeEditingService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }
示例#14
0
 public IssueController(
     IMapper mapper,
     IGenreRetrievalService genreRetrievalService,
     IIssueCreationService issueCreationService,
     IIssueDetachmentService issueDetachmentService,
     IIssueDeletionService issueDeletionService,
     IIssueEditingInfoService issueEditingInfoService,
     IIssueEditingService issueEditingService,
     IMemoryCache cache,
     ICacheKeyHolderService <int> cacheKeyHolder)
 {
     this.mapper = mapper;
     this.genreRetrievalService   = genreRetrievalService;
     this.issueCreationService    = issueCreationService;
     this.issueDetachmentService  = issueDetachmentService;
     this.issueDeletionService    = issueDeletionService;
     this.issueEditingInfoService = issueEditingInfoService;
     this.issueEditingService     = issueEditingService;
     this.cache          = cache;
     this.cacheKeyHolder = cacheKeyHolder;
 }