/// <summary> /// Initializes a new instance of the <see cref="PublishedSnapshot"/> class with a content cache /// and a media cache. /// </summary> public PublishedSnapshot( PublishedContentCache contentCache, PublishedMediaCache mediaCache, PublishedMemberCache memberCache, DomainCache domainCache) { Content = contentCache; Media = mediaCache; Members = memberCache; Domains = domainCache; }
public override IPublishedSnapshot CreatePublishedSnapshot(string previewToken) { // use _requestCache to store recursive properties lookup, etc. both in content // and media cache. Life span should be the current request. Or, ideally // the current caches, but that would mean creating an extra cache (StaticCache // probably) so better use RequestCache. var domainCache = new DomainCache(_domainService, _defaultCultureAccessor); return(new PublishedSnapshot( new PublishedContentCache(_xmlStore, domainCache, _requestCache, _globalSettings, _contentTypeCache, _routesCache, previewToken), new PublishedMediaCache(_xmlStore, _mediaService, _userService, _requestCache, _contentTypeCache, _entitySerializer, _umbracoContextAccessor), new PublishedMemberCache(_xmlStore, _requestCache, _memberService, _contentTypeCache), domainCache)); }