Created
March 17, 2012 04:06
-
-
Save emiaj/2054836 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AssetsWarmUpPolicy : IAssetPolicy | |
| { | |
| private readonly IAssetRequirements _requirements; | |
| private readonly IAssetTagPlanCache _planCache; | |
| public AssetsWarmUpPolicy(IAssetRequirements requirements, IAssetTagPlanCache planCache) | |
| { | |
| _requirements = requirements; | |
| _planCache = planCache; | |
| } | |
| public void Apply(IPackageLog log, IAssetPipeline pipeline, AssetGraph graph) | |
| { | |
| // WARM UP | |
| new[] { "site-css",..... } | |
| .Each(x => | |
| { | |
| _requirements.Require(x); | |
| _requirements.DequeueAssetsToRender() | |
| .Select(_planCache.PlanFor) | |
| .ToList(); | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment