The problem is that OutputCache Shared=False (cache sep version for each page) does not work with MasterPages. Well, at least not how I think it should work.
Instead of caching a seperate version of the user control for each .aspx page, it simply caches a single version of each user control for the .master page. This makes fragment caching totally useless if you require the control to change depending on what page it is on, but still want it cached. Such as having user controls with runat=server images with root-relative paths and you use the same master page over multiple directories.
Example:
Page1 (/index.aspx) uses Master.master which has a UserControl (say like a header) with an Image of path "~/images/test.gif". This UserControl also outputs the page path.
Page2 (/folder/index.aspx) uses the same Master.master.
If you request Page1 first, your image gets cached as "images/test.gif" and you see output "/index.aspx".
When you request Page2 your image path is still "images/test.gif" and thus incorrect and you still see output "/index.aspx".
If I disable the OutputCache of the UserControl everything works fine.
Shouldn't Shared=False create unique cache per .aspx file and not .master file?? Is there a workaround that I could use where I don't have to have the cached UserControl referenced in each Child page instead of only once in the MasterPage?
Like is there any kind of static property I can access about the page and thus use a varyByCustom="PageChecker" in the UserControl? Request.Path won't be available from what I can tell...