I've got a asp.net web site on windows with rather over the top server side caching of files that never change. Unsurprisingly the files have changed. How do I reset the server side cache? I've see lots of how to do it in code but I don't want to add a new page that will clear the cache unless I have too. An IISreset or a box reset will clear the cache but that's rather drastic. Will an application pool recycle? The app pools are set to terminate after idle time out, that'll probably happen overnight will that clear the cache?
code is:
using WebApi.OutputCache.V2;
namespace Foo.Web.API.Controllers
{
public class BarController : ApiController
{
[HttpGet]
[CacheOutput ServerTimeSpan = 31536000)]
public HttpResponseMessage Get(string organisationId, string file)
{
I had to delete the files here. This is all that worked for me.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
Both clear the cache. Recycling an App Pool is just less drastic, as it continues to process already received requests and cycles after that. This can be done under load - never had issues with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With