DarthFubuMVC/fubumvc — pull request #254 by emiaj (2012-03-20 21:10:52+00:00)
Title: Introduced WarmUpSetsForCombinationPolicy to fill the combinations cache at startup.

To reproduce this issue, you can take a look at this working sample:
https://github.com/emiaj/FubuAssetCombinationIssue
The "master" branch reproduce the issue when you click on the hardcoded links targeting the combined sets (site-scripts and site-styles).

If you checkout the "custom-fubu" branch, you will notice that when clicking those hardcoded links the problem is gone.

The problem relies on depending on the IFubuPage asset related methods (WriteCssTags, WriteScriptTags) to populate the combination cache, thus, there are scenarios where the app recycles itself just after the view has been delivered, and that causes the following exception:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
No combination or asset file exists with the name ....

So the idea is to proactively populate this cache at least for asset sets at startup when CombineAllUniqueAssetRequests is specified.