Ejemplo n.º 1
0
        public void Set(string cacheKey, object cacheEntry, int minutes)
        {
            var data = JsonConvert.SerializeObject(cacheEntry, new JsonSerializerSettings {
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            });

            _memoryCache.SetString(cacheKey, data, minutes);
        }