Clear Browser Cache using Asp.net c#

web cache is a Process for the temporary storage of web documents, such as HTML pages and images, to reduce bandwidth usage, server load.

Use this function all the Button Click Event Automatically Clear the cache memory.

    public void RemoveCache()
        {
            HttpContext context = HttpContext.Current;
            IDictionaryEnumerator enumerator = context.Cache.GetEnumerator();
            while (enumerator.MoveNext())
            {
                context.Cache.Remove(enumerator.Key.ToString());
            }
        }


Comments

Popular posts from this blog

Insecure cookie setting: missing Secure flag

Maximum Stored Procedure Function Trigger or View Nesting Level Exceeded (limit 32) in SQL Server

Display Line Chart Using Chart.js MVC C#