some more work on caching. Looks like I've got it all now.