Example #1
0
        private static string RequestPeekInCacheContent(HttpRequest request)
        {
            if (request.Method != "GET")
            {
                return(null);
            }

            if (!request.Path.StartsWithSegments(new PathString("/PeekInCache")))
            {
                return(null);
            }

            var cacheName = request.Path.Value.Split('/').Last();


            if (!CacheRefernceStore.Exists(cacheName))
            {
                return(null);
            }

            var cache = DetermineSerialzableCache(cacheName);

            return(cache != null?JsonConvert.SerializeObject(cache) : null);
        }