Clear maintained cache forcefully which stored the website of users' data.
How to clear cache in ASP.NET MVC?
261
20-Jan-2023
Updated on 20-Jan-2023
Amrita Bhattacharjee
21-Jan-2023Hi,
To answer this specific question,first of all we need to know that cache is specific object type in ASP.NET.We can use or implement several methods for removing cache but the most easy way would be the using of following syntax-
var staleItem = Url.Action('Action', “YourController”, new
{
Id = model.Id,
area = 'areaname';
});
Response.RemoveCacheItem(staleItem);