views:

32

answers:

0

I am trying to cache the output of a controller action in MVC2 like this:

[OutputCache(Duration = 600, VaryByParam = "id", Location=System.Web.UI.OutputCacheLocation.Server)]
        public FileContentResult GetImage(int id) {
}

When the user uploads a new image for their icon I invalidate the cache using the following line:

HttpResponse.RemoveOutputCacheItem("/MyPage/GetImage/" + u.UserID.ToString());

However this doesn't seem to work and I can't figure out why

related questions