title: Output Caching - GetVaryByCustomString based on value set in PageLoad()
body: <p>I am using ASP.net Output Caching and want to implement GetVaryByCustomString () version of it. However I've gotten into a problem when the cache is based on a value set in the PageLoad() of a page.</p>
  
  <p>When Default.aspx load, the version of the USER CONTROL I would like to show is based on the URL which needs to go through a database query. </p>
  
  <p>www.website.com/apples will load and in the code behind of the page, I make a query to the database, retrieve the values I want.</p>
  
  <p>Would it be possible to use output caching, or would I need to implement my own variation of it. </p>
  
  <p>Would it be possible to querying the Database earlier in the page lifecycle such that when GetVaryByCustomString is executed, the variable will be already set?</p>