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

Unable to perform operation on the item is locked in workspace

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

Insecure cookie setting: missing Secure flag