public static void Main()
var match = new Match() {
var cacheKey = new MatchCacheKey(match.Id);
Console.WriteLine("CacheKey Value: {0}", cacheKey.CacheKey);
public Guid Id {get;set;}
public DateTime Time {get;set;}
public class MatchCacheKey : ICacheKey<Match>
private readonly Guid _matchId;
public MatchCacheKey(Guid matchId){
public string CacheKey => $"MatchId_{_matchId.ToString("N")}";
public interface ICacheKey<TItem> where TItem : class