public static void Add(string from, string to, ApiDiff diff) { var cacheKey = $"{from}_{to}"; Keys.Add(cacheKey); Cache.Set(cacheKey, diff, new MemoryCacheEntryOptions().SetSize(1)); }
public static bool Get(string from, string to, out ApiDiff diff) { var cacheKey = $"{from}_{to}"; return(Cache.TryGetValue(cacheKey, out diff)); }