Use a cache for dependency details
When determining the details of a transaction, we are often looking up the
providers for the same dependencies over and over. Cache the results the
in a hash table to avoid this - this can make the overall operation several
times faster.