Cache deleted commits.

This fixes really terrible performance when very few commits contribute
to an extract.