cache: Save shasum, write resolved/etc data to cache

Don't throw away that delicious metadata.
cache: treat missing versions as a 404

Regression caused by always fetching the root doc