Beispiel #1
0
        //
        // GET: /DistributedCache/

        public ActionResult Index(string key)
        {
            Dictionary <string, string> allCache = DistributedCache.GetAllCache();

            if (allCache == null)
            {
                allCache = new Dictionary <string, string>();
            }
            if (!string.IsNullOrEmpty(key))
            {
                ViewBag.AllCache = allCache.Where(t => t.Key.Contains(key));
            }
            else
            {
                ViewBag.AllCache = allCache;
            }
            return(View());
        }