I'm using a \[code\]VirtualPathProvider\[/code\] that currently maps a virtual path to a directory external to the solution. I'm building this mainly for self-exercise. This is totally equivalent of having a soft-link or NTFS hard-link in the solution's directory.Anyway, I managed to successfully load static images from that virtual directory using my custom provider.Now the problem is that the browser won't cache images. And the server doesn't even think about returning cache information (like ETag).Here is what I've done:
- \[code\]GetFile(path).Open()\[/code\] returns \[code\]FileStream\[/code\] via \[code\]File.Open()\[/code\]
- I did not override \[code\]GetCacheKey\[/code\] and \[code\]GetCacheDependencies\[/code\]
- I did override \[code\]GetFileHash\[/code\] returning the Murmur hash (seems to be the fastest, even than CRC-32) and tested it
- While debugging, \[code\]GetFileHash\[/code\] is never invoked in my provider