private static Predicate<Implementation> BuildCacheChecker(IStore store)
{
var storeContainsCache = new TransparentCache<ManifestDigest, bool>(store.Contains);
return implementation =>
{
if (!string.IsNullOrEmpty(implementation.LocalPath)) return true;
var externalImplementation = implementation as ExternalImplementation;
if (externalImplementation != null) return externalImplementation.IsInstalled;
return storeContainsCache[implementation.ManifestDigest];
};
}
#endregion