public StaticContentServiceImpl(ILiquidThemeEngine liquidEngine, ILocalCacheManager cacheManager, Func <WorkContext> workContextFactory, Func <IStorefrontUrlBuilder> urlBuilderFactory, Func <string, ContentItem> contentItemFactory, IStaticContentBlobProvider contentBlobProvider) { _liquidEngine = liquidEngine; _cacheManager = cacheManager; _workContextFactory = workContextFactory; _urlBuilderFactory = urlBuilderFactory; _contentItemFactory = contentItemFactory; _contentBlobProvider = contentBlobProvider; //Observe content changes to invalidate cache if changes occur _contentBlobProvider.Changed += (sender, args) => { _cacheManager.Clear(); }; _contentBlobProvider.Renamed += (sender, args) => { _cacheManager.Clear(); }; _markdownPipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); }
public AssetController(WorkContext context, IStorefrontUrlBuilder urlBuilder, ILiquidThemeEngine themeEngine, IStaticContentBlobProvider staticContentBlobProvider) : base(context, urlBuilder) { _themeEngine = themeEngine; _staticContentBlobProvider = staticContentBlobProvider; }