Files
Umbraco-CMS/src/Umbraco.Core/PublishedCache/IDocumentCacheService.cs
Mole d1799ecdd2 V15: Refresh caches on load balanced environments (#17296)
* Move DocumentCacheService

* Add clear all documentws from memory cache

* Fix RedirectTracker

* Implement refresh node/branch/all/delete

* Only update databasecache in RefreshContentAsync

* Fix tests

* Skip blueprints in cache

* Clear caches when contenttype is updated

* Clear cache on data type update

* Refresh media

* Only update memory cache from refreshers

* Fix imports

* Add named options

* Use cache entry settings in media

* Obsolete nucache settings

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-10-28 15:31:39 +01:00

32 lines
936 B
C#

using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Core.PublishedCache;
public interface IDocumentCacheService
{
Task<IPublishedContent?> GetByKeyAsync(Guid key, bool? preview = null);
Task<IPublishedContent?> GetByIdAsync(int id, bool? preview = null);
Task SeedAsync(CancellationToken cancellationToken);
Task<bool> HasContentByIdAsync(int id, bool preview = false);
Task RefreshContentAsync(IContent content);
Task DeleteItemAsync(IContentBase content);
void Rebuild(IReadOnlyCollection<int> contentTypeIds);
IEnumerable<IPublishedContent> GetByContentType(IPublishedContentType contentType);
Task ClearMemoryCacheAsync(CancellationToken cancellationToken);
Task RefreshMemoryCacheAsync(Guid key);
Task RemoveFromMemoryCacheAsync(Guid key);
Task RebuildMemoryCacheByContentTypeAsync(IEnumerable<int> contentTypeIds);
}