namespace Application.Abstractions.Cache; public interface ICacheService { Task GetAsync(string key, CancellationToken ct = default); Task SetAsync(string key, T value, CancellationToken ct = default); Task SetAsync(string key, T value, TimeSpan expiry, CancellationToken ct = default); Task RemoveAsync(string key, CancellationToken ct = default); Task RemoveByPrefixAsync(string prefix, CancellationToken ct = default); /// /// 분산 원자적 잠금 (SET NX EX). 키가 이미 있으면 false, 없으면 생성 후 true 반환. /// 쿨다운, 중복 처리 방지 등에 사용. /// Task TryLockAsync(string key, TimeSpan expiry, CancellationToken ct = default); }