Add caching for apt and pip

I guess apt isn't actually necessary, at the moment.