Merge pull request #842 from umbraco/temp-U4-7285

U4-7285 Fix DistributedCache.ClearXxxCacheOnCurrentServer
This commit is contained in:
Stephan
2015-10-28 19:38:04 +01:00
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);