namespace QuantEngine.Core.Interfaces; /// /// Token caching for KIS API authentication. /// Replaces Python's sqlite3-based token storage with PostgreSQL. /// public interface ITokenCache { /// /// Retrieve cached access token if valid and not near expiration. /// /// Account type: "real" or "mock" /// Access token if cached and valid; null if expired or missing Task GetCachedTokenAsync(string account); /// /// Store access token with expiration time. /// /// Account type: "real" or "mock" /// Access token /// Token expiration time (UTC) Task SaveTokenAsync(string account, string token, DateTime expiresAt); /// /// Clear expired tokens and stale entries. /// Task ClearExpiredTokensAsync(); }