ASP.Net Mvc - Physical location (e.g. on C:\ drive) of OutputCacheLocation.Client files

165 views Asked by At

I have a frequently-visited page which contains a number of images. I would like to download the image to the client's machine on the first occasion that the image is requested, and, refer to that file on subsequent requests, rather than download again.

To set this up, I have the following Mvc action:

[OutputCache(Duration = 3600, Location = OutputCacheLocation.Client, VaryByParam = "id")]
    public async Task<ActionResult> Download(string id)
    {

        DigitalMedia returnItem = await GrabFile(id);
        return File(returnItem.FileData, returnItem.MIMEType, returnItem.FileName);

    }

I'm trying to test out if my code is actually downloading the images, so I'd like to physically view them on my machine as they are downloaded.

Can anyone let me know where this physical location is? I am using Windows 7 and IE10, and have been observing files appearing in the following location, but I'm not really sure what I should be looking for:

C:\Users\MyName\AppData\Local\Microsoft\Windows\Temporary Internet Files

The actual img tag containing the request to download is rendered as follows, so I was hoping to see a file with a name such as 0000000001-0000000000000400922 somewhere on my machine, but I can't see one.

<img class="xsyco-map" alt="slide" src="/DigitalMedia/Download/0000000001-0000000000000400922"/>

I have looked at the following similar threads, but haven't found a reply

ASP.NET MVC - caching pages on client side

MVC caching database images

Thanks

0

There are 0 answers