Add caching

Pulled out the repeated use of request and added a cache
OK I will change it, I tweaked it because I was seeing error when developing the module which was annoying.