'Reads the data from the cache file and assigns it to member variables as Python Objects'

def load_from_cache(self):

    try:
        cache = open(self.cache_filename, 'r')
        json_data = cache.read()
        cache.close()
        data = json.loads(json_data)
    except IOError:
        data = {'data': {}, 'inventory': {}}
    self.data = data['data']
    self.inventory = data['inventory']
