Caching questions ...
Posted on 2004-09-03
I'm trying to understand the best way to cache my site ... My pages are currently designed so that each has 2 user controls (banner & menu). The banner displays the current userid in a label server control. The userid also allows for a 'guest' user. The main bulk of each page shows various database views which will be different depending on the page (directed via the menu user control) and the userid (Guest users will always get the same results per page).
If I use VaryByCustom="browser" do I have to specify any code or variables anywhere else ? Also will it prevent me from using other caching methods or will it interwork with, say, VaryByControl ?
Can I use VaryByControl with the userid label in the banner (given that it is in a label which is read from a current session variable) ? If I can use it, will it cache just the banner or the whole page ? If I can't use this, should I use partial page caching on each individual datagrid etc or is there a better way ?
Also, (how) can I utilise Shared with any of these so that all my guest pages are cached together whilst maintaining the individual views of non-guest users?