added cache detection + expiration function, need to refactor how to request/save data to cache

Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>