added wrapper function to check if a cache of analysis set exists, and if so use that, otherwise pull through api and create cache