U4-7285 Every server that reads a instruction from umbracoCacheInstruction will also write the same instruction to the database. Intentional ?

This commit is contained in:
Shannon
2015-10-27 19:24:56 +01:00
parent badd9ae289
commit 84db2f4d85
3 changed files with 24 additions and 20 deletions

View File

@@ -220,9 +220,9 @@ namespace Umbraco.Core.Sync
// FIXME not true if we're running on a background thread, assuming we can?
var sql = new Sql().Select("*")
.From<CacheInstructionDto>()
.From<CacheInstructionDto>(_appContext.DatabaseContext.SqlSyntax)
.Where<CacheInstructionDto>(dto => dto.Id > _lastId)
.OrderBy<CacheInstructionDto>(dto => dto.Id);
.OrderBy<CacheInstructionDto>(dto => dto.Id, _appContext.DatabaseContext.SqlSyntax);
var dtos = _appContext.DatabaseContext.Database.Fetch<CacheInstructionDto>(sql);
if (dtos.Count <= 0) return;
@@ -294,7 +294,7 @@ namespace Umbraco.Core.Sync
private void EnsureInstructions()
{
var sql = new Sql().Select("*")
.From<CacheInstructionDto>()
.From<CacheInstructionDto>(_appContext.DatabaseContext.SqlSyntax)
.Where<CacheInstructionDto>(dto => dto.Id == _lastId);
var dtos = _appContext.DatabaseContext.Database.Fetch<CacheInstructionDto>(sql);