Service#
SettingsService exposes get<T>(key, defaultValue?), has(key), set(key, value), remove(key), clear() and all(). It uses a repository port and the kernel CACHE_PROVIDER.
Repository contract#
ISettingsRepository exposes get<T>(key), set(key, value), delete(key), clear() and optional all(). Tokens are exported as SETTINGS_REPOSITORY and SETTINGS_SERVICE.
Caching semantics#
Reads check settings:<key> in the cache before the repository. A non-null repository value is cached. Writes update persistence and cache; removal deletes persistence and the matching cache entry. clear() calls both repository and cache clear operations, so ensure the injected cache provider is scoped appropriately for the application.