How to clear particular Cache value in ASP.Net

Last Reply on Mar 22, 2017 03:25 AM By dharmendr

Posted on Mar 22, 2017 02:40 AM

Hi,

I  provide an option to clear purticular cache in a single page.But,all the caches used in the entire application shouild be cleared.why this should be  cleared? How to to resolve it?

You are viewing reply posted by: dharmendr on Mar 22, 2017 03:25 AM.
Posted on Mar 22, 2017 03:25 AM

Hi salini,

Use the below code to clear a particular cache instead of the entire cache value.

HttpContext.Current.Cache.Remove("Key")