new caching framework for API calls that allows for a fallback

@rowanseymour Can you give this a once over since it borrows from one of your patterns? (look lambdas!)