namespace Umbraco.Web.PublishedCache { /// /// Provides caches (content and media). /// /// Default implementation for unrelated caches. class PublishedCaches : IPublishedCaches { private readonly IPublishedContentCache _contentCache; private readonly IPublishedMediaCache _mediaCache; /// /// Initializes a new instance of the class with a content cache /// and a media cache. /// public PublishedCaches(IPublishedContentCache contentCache, IPublishedMediaCache mediaCache) { _contentCache = contentCache; _mediaCache = mediaCache; } /// /// Creates a contextual content cache for a specified context. /// /// The context. /// A new contextual content cache for the specified context. public ContextualPublishedContentCache CreateContextualContentCache(UmbracoContext context) { return new ContextualPublishedContentCache(_contentCache, context); } /// /// Creates a contextual media cache for a specified context. /// /// The context. /// A new contextual media cache for the specified context. public ContextualPublishedMediaCache CreateContextualMediaCache(UmbracoContext context) { return new ContextualPublishedMediaCache(_mediaCache, context); } } }