U4-11227 - default variations and fallback (wip)
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
// fixme - use SqlTemplate for these queries else it's going to be horribly slow!
|
||||
|
||||
// provides efficient database access for NuCache
|
||||
internal class Database
|
||||
internal class DatabaseDataSource : IDataSource
|
||||
{
|
||||
// we want arrays, we want them all loaded, not an enumerable
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
throw new Exception("Missing cmsContentNu edited content for node " + dto.Id + ", consider rebuilding.");
|
||||
Current.Logger.Warn<Database>("Missing cmsContentNu edited content for node " + dto.Id + ", consider rebuilding.");
|
||||
Current.Logger.Warn<DatabaseDataSource>("Missing cmsContentNu edited content for node " + dto.Id + ", consider rebuilding.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -211,7 +211,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
throw new Exception("Missing cmsContentNu published content for node " + dto.Id + ", consider rebuilding.");
|
||||
Current.Logger.Warn<Database>("Missing cmsContentNu published content for node " + dto.Id + ", consider rebuilding.");
|
||||
Current.Logger.Warn<DatabaseDataSource>("Missing cmsContentNu published content for node " + dto.Id + ", consider rebuilding.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Scoping;
|
||||
|
||||
namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a data source for NuCache.
|
||||
/// </summary>
|
||||
internal interface IDataSource
|
||||
{
|
||||
ContentNodeKit GetContentSource(IScope scope, int id);
|
||||
IEnumerable<ContentNodeKit> GetAllContentSources(IScope scope);
|
||||
IEnumerable<ContentNodeKit> GetBranchContentSources(IScope scope, int id);
|
||||
IEnumerable<ContentNodeKit> GetTypeContentSources(IScope scope, IEnumerable<int> ids);
|
||||
|
||||
ContentNodeKit GetMediaSource(IScope scope, int id);
|
||||
IEnumerable<ContentNodeKit> GetAllMediaSources(IScope scope);
|
||||
IEnumerable<ContentNodeKit> GetBranchMediaSources(IScope scope, int id);
|
||||
IEnumerable<ContentNodeKit> GetTypeMediaSources(IScope scope, IEnumerable<int> ids);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user