Esempio n. 1
0
        public void SetNoCacheHeaders(IHttpContextWrapper context)
        {
            var config = _headerConfigurationOverrideHelper.GetNoCacheHeadersWithOverride(context);

            if (config == null || !config.Enabled)
            {
                return;
            }

            context.SetNoCacheHeaders();
        }
Esempio n. 2
0
        public void SetNoCacheHeaders(HttpContext context)
        {
            var config = _headerConfigurationOverrideHelper.GetNoCacheHeadersWithOverride(context);

            if (config == null || !config.Enabled)
            {
                return;
            }

            var response = context.Response;

            response.Headers["Cache-Control"] = "no-cache, no-store, must-revalidate";
            response.Headers["Expires"]       = "-1";
            response.Headers["Pragma"]        = "no-cache";
        }
        public void SetNoCacheHeaders(HttpContextBase context)
        {
            var config = _headerConfigurationOverrideHelper.GetNoCacheHeadersWithOverride(context);

            if (config == null || !config.Enabled)
            {
                return;
            }

            var response = context.Response;

            response.Cache.SetCacheability(HttpCacheability.NoCache);
            response.Cache.SetNoStore();
            response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
        }