Facade - use NoCache policy when reloading

This commit is contained in:
Stephan
2016-06-01 17:42:54 +02:00
parent 7c5542dca3
commit 03107dc82b
6 changed files with 29 additions and 0 deletions

View File

@@ -1215,6 +1215,7 @@ WHERE cmsContentNu.nodeId IN (
// insert back - if anything fails the transaction will rollback
var repository = uow.CreateRepository<IContentRepository>();
((ContentRepository) repository).SetNoCachePolicy();
var query = repository.Query;
if (contentTypeIds != null && contentTypeIdsA.Length > 0)
query = query.WhereIn(x => x.ContentTypeId, contentTypeIdsA); // assume number of ctypes won't blow IN(...)
@@ -1284,6 +1285,7 @@ WHERE cmsContentNu.nodeId IN (
// insert back - if anything fails the transaction will rollback
var repository = uow.CreateRepository<IMediaRepository>();
((MediaRepository)repository).SetNoCachePolicy();
var query = repository.Query;
if (contentTypeIds != null && contentTypeIdsA.Length > 0)
query = query.WhereIn(x => x.ContentTypeId, contentTypeIdsA); // assume number of ctypes won't blow IN(...)
@@ -1343,6 +1345,7 @@ WHERE cmsContentNu.nodeId IN (
// insert back - if anything fails the transaction will rollback
var repository = uow.CreateRepository<IMemberRepository>();
((MemberRepository)repository).SetNoCachePolicy();
var query = repository.Query;
if (contentTypeIds != null && contentTypeIdsA.Length > 0)
query = query.WhereIn(x => x.ContentTypeId, contentTypeIdsA); // assume number of ctypes won't blow IN(...)