Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ public void Rebuild(IReadOnlyCollection<int> contentTypeIds)
_databaseCacheRepository.Rebuild(contentTypeIds.ToList());
RebuildMemoryCacheByContentTypeAsync(contentTypeIds).GetAwaiter().GetResult();
scope.Complete();

// Clear the entire published content cache.
// It doesn't seem feasible to be smarter about this, as a changed content type could be used for a document,
// an elements within the document, an ancestor or a composition.
_publishedContentCache.Clear();
}

public async Task RebuildMemoryCacheByContentTypeAsync(IEnumerable<int> contentTypeIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ public void Rebuild(IReadOnlyCollection<int> contentTypeIds)
}

scope.Complete();

// Clear the entire published content cache.
// It doesn't seem feasible to be smarter about this, as a changed content type could be used for a media item,
// an elements within the media item, an ancestor, or a composition.
_publishedContentCache.Clear();
}

public IEnumerable<IPublishedContent> GetByContentType(IPublishedContentType contentType)
Expand Down
Loading