namespace Umbraco.Web.PublishedCache { /// /// Provides caches (content and media). /// /// Default implementation for unrelated caches. class PublishedCaches : IPublishedCaches { /// /// 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; } /// /// Gets the content cache. /// public IPublishedContentCache ContentCache { get; private set; } /// /// Gets the media cache. /// public IPublishedMediaCache MediaCache { get; private set; } /// /// 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); } } }