public ItemLevelCachePartHandler(IJsonConverter jsonConverter, ICacheService cacheService, IContentManager contentManager, IShapeDisplay shapeDisplay, IItemLevelCacheService itemLevelCacheService, IEnumerable <ICompositeCacheKeyProvider> compositeCacheKeyProviders)
        {
            mCacheService                  = cacheService;
            mContentManager                = contentManager;
            mShapeDisplay                  = shapeDisplay;
            mItemLevelCacheService         = itemLevelCacheService;
            mCompositeCacheKeyProviderList = compositeCacheKeyProviders;

            OnInitializing <ItemLevelCachePart>((context, part) =>
            {
                // This is required to initialize the settings for new content items.
                InitializeSettings(part);
            });

            OnLoading <ItemLevelCachePart>((context, part) =>
            {
                // This is required to initialize the settings for existing content items.
                if (part.SerializedItemLevelCacheSettings != null)
                {
                    part.ItemLevelCacheSettings = jsonConverter.Deserialize <Dictionary <string, ItemLevelCacheSettings> >(part.SerializedItemLevelCacheSettings);
                }

                InitializeSettings(part);
            });

            OnPublished <ItemLevelCachePart>((context, part) => Invalidate(part));
        }
Esempio n. 2
0
 public CacheItemsController(IAuthorizer authorizer, IOutputCacheStorageProvider cacheStorageProvider, ITagCache tagCache, IItemLevelCacheService itemLevelCacheService, INotifier notifier)
 {
     mCacheStorageProvider  = cacheStorageProvider;
     mTagCache              = tagCache;
     mItemLevelCacheService = itemLevelCacheService;
     mNotifier              = notifier;
     mAuthorizer            = authorizer;
 }
Esempio n. 3
0
 public ItemLevelCachePlaceholderProvider(
     IContentManager contentManager,
     IShapeDisplay shapeDisplay,
     IItemLevelCacheService itemLevelCacheService,
     IJsonConverter jsonConverter,
     IResourceCapture resourceCapture,
     IResourceManager resourceManager)
 {
     mContentManager        = contentManager;
     mShapeDisplay          = shapeDisplay;
     mItemLevelCacheService = itemLevelCacheService;
     mJsonConverter         = jsonConverter;
     mResourceCapture       = resourceCapture;
     mResourceManager       = resourceManager;
 }
Esempio n. 4
0
 public PlaceholderSubstitutionShapeTableService(IItemLevelCacheService itemLevelCacheService, IHttpContextAccessor httpContextAccessor)
 {
     mItemLevelCacheService = itemLevelCacheService;
     mHttpContextAccessor   = httpContextAccessor;
 }
Esempio n. 5
0
        public DisplayedContentItemHandler(IItemLevelCacheService itemLevelCacheService)
        {
            mItemLevelCacheService = itemLevelCacheService;

            mItemIdList = new List <int>(new [] { PageLevelCacheTag.GenericTag });
        }