I am using OutputCaching on my Index page where a list of employee records are displayed
[OutputCache(Duration = 120, VaryByParam = "empId;page;sort;")]
But when I delete one record from the list , because of caching ,the deleted record is also is getting listed until the Outputcache expires . Is there a way I can refresh the outputcache if a delete operation happens ?. I am using this on my MVC3 razor pages.
I have 100's of records listed on my page and each record has a "Delete" button to delete that particular record.I am also using OutputCaching on the page so that the page loads faster.
Now if I delete one record by hitting the delete button ,due to OutputCaching ,even the deleted record is also shown on the page until the outputcache expires. Is there a way ,I can get around with this problem?
Is there a way,I can just remove only the deleted record from my outputCache?
or If am adding a new record ,I don't want to delete the OutputCache and recreate theCache again,instead i want append my new record to existing outputCache ?