Cache Tool initial commit

This is the old code, basically everything needs to be re-done. Was done
in a relative rush so its pretty much a mess.