Interface IRemoteContentCallService
public interface IRemoteContentCallService
Methods
ClearContentCacheAsync()
Task ClearContentCacheAsync()
Returns
GetCacheCountsByLanguage()
Number of currently-cached content entries grouped by language key — i.e. how much content has been loaded so far per language (warm-up + lazy loads). For diagnostics/admin display.
IReadOnlyDictionary<Guid, int> GetCacheCountsByLanguage()
Returns
GetContentAsync(string, string, Guid, ContentFormat?, string, IReadOnlyDictionary<string, string>)
Task<(string Value, bool Success)> GetContentAsync(string key, string defaultValue, Guid languageKey, ContentFormat? contentType, string application = null, IReadOnlyDictionary<string, string> translations = null)
Parameters
keystringdefaultValuestringlanguageKeyGuidcontentTypeContentFormat?applicationstringtranslationsIReadOnlyDictionary<string, string>
Returns
GetContentResultAsync(string, string, Guid, ContentFormat?, string, IReadOnlyDictionary<string, string>)
As GetContentAsync(string, string, Guid, ContentFormat?, string, IReadOnlyDictionary<string, string>), but also reports where the value came from. Prefer this when the caller needs to tell a server value apart from a cached one or a fallback default.
Task<ContentResult> GetContentResultAsync(string key, string defaultValue, Guid languageKey, ContentFormat? contentType, string application = null, IReadOnlyDictionary<string, string> translations = null)
Parameters
keystringdefaultValuestringlanguageKeyGuidcontentTypeContentFormat?applicationstringtranslationsIReadOnlyDictionary<string, string>
Returns
GetLanguagesAsync(bool)
Task<Language[]> GetLanguagesAsync(bool forceReload)
Parameters
forceReloadbool
Returns
SetContentAsync(string, string, Guid, ContentFormat, string)
Task SetContentAsync(string key, string defaultValue, Guid languageKey, ContentFormat contentType, string application = null)
Parameters
keystringdefaultValuestringlanguageKeyGuidcontentTypeContentFormatapplicationstring
Returns
WarmCacheAsync(Guid, string)
Pre-fill the local cache for an entire application + language in one bulk call (the startup
warm-up). Eliminates the per-key fan-out on cold load. Best-effort: a missing endpoint (old
server, 404), failure, or timeout is swallowed so the normal per-key path still serves
content. application follows the usual convention (null → resolve).
Task WarmCacheAsync(Guid languageKey, string application = null)
Parameters
Returns
WarmConfiguredLanguagesAsync(string)
Warm the default language plus every language named in
WarmUpLanguages in one bulk call each. Used by the startup
warm-up and by "Reload Content". A configured name with no matching server language is
skipped with a Warning. Best-effort throughout, like WarmCacheAsync(Guid, string).
Task WarmConfiguredLanguagesAsync(string application = null)
Parameters
applicationstring