namespace Application.Abstractions.Cache; public static class CacheKeys { public const string Config = "config"; public const string FaqCategoryActive = "faq:category:active"; public const string PopupPositionActive = "popup:position:active"; public static string FaqItemByCode(string code) => $"faq:item:{code}"; public static string PopupByCode(string code) => $"popup:{code}"; public static string BannerByCode(string code) => $"banner:{code}"; public static string BannerByCodeActive(string code) => $"banner:{code}:active"; public static string DocumentByCode(string code) => $"document:{code}"; public static string BoardMeta(int boardID) => $"board:meta:{boardID}"; public const string CryptoCategoryActive = "crypto:category:active"; public static string CoinBySymbol(string symbol) => $"crypto:coin:{symbol.ToLower()}"; // Crypto Ticker (market = "KRW-BTC" 형식) public static string CryptoTickers(string quote) => $"crypto:tickers:{quote.ToLower()}"; public static string CryptoTicker(string market) => $"crypto:ticker:{market.ToLower()}"; public static string CryptoCandle(string market, string type) => $"crypto:candle:{market.ToLower()}:{type}"; // Crypto REST (초기 로딩용) public const string CryptoMarkets = "crypto:markets"; public static string CryptoTickerDetail(string market) => $"crypto:ticker:detail:{market.ToLower()}"; public static string CryptoTrades(string market) => $"crypto:trades:{market.ToLower()}"; public static string CryptoOrderbook(string market) => $"crypto:orderbook:{market.ToLower()}"; // Crypto WebSocket Live (실시간용) public static string CryptoCandleLive(string market, string interval) => $"crypto:candle:live:{market.ToLower()}:{interval}"; public static string CryptoTradeLive(string market) => $"crypto:trade:live:{market.ToLower()}"; public static string CryptoOrderbookLive(string market) => $"crypto:orderbook:live:{market.ToLower()}"; // Chat public const string ChatGlobalMessages = "chat:global:messages"; public const string ChatConnections = "chat:connections"; // Hash — 실시간 접속자 (전역) public const string ChatKickChannel = "chat:kick"; // Pub/Sub — 강제 퇴장 // 채널별 채팅 격리 — watch 페이지에서 채널 단위 방 public static string ChatChannelMessages(string channelSID) => $"chat:channel:{channelSID}:messages"; public static string ChatChannelConnections(string channelSID) => $"chat:channel:{channelSID}:connections"; // Member Presence (Online tracker) public const string MemberOnlineSet = "member:online"; // Set — 1개 이상 connection 보유한 memberID 집합 public static string MemberConnections(int memberID) => $"member:connections:{memberID}"; // Set — 멤버별 활성 connectionId (refcount용) // AppHub 전역 접속자 (Admin 현재 접속자 페이지) public const string AppConnections = "app:connections"; // Hash — connectionId → ConnectedUser JSON (게스트 포함) public const string AppKickChannel = "app:kick"; // Pub/Sub — AppHub 연결 강제 종료 // YouTube public static string YouTubeChannel(string channelId) => $"youtube:channel:{channelId}"; public static string YouTubeLiveStream(string videoId) => $"youtube:live:{videoId}"; public const string YouTubePubSubChannels = "youtube:pubsub:channels"; // Set — 구독 중인 채널 ID public const string YouTubeFeedLastPolled = "youtube:feed:lastPolled"; // Hash — channelId → UTC ISO8601 (성공/스킵 무관 매 폴링 시각) public const string YouTubePubSubLease = "youtube:pubsub:lease"; // Hash — channelId → UTC ISO8601 (lease 만료 예정 시각) public const string YouTubeApiTestKeyCooldown = "youtube:api:testkey:cooldown"; // 수동 API 키 테스트 버튼 30초 쿨다운 }