Add caching

Pulled out the repeated use of request and added a cache
Thanks for pulling this out in to it's own module. It really needed doing.