def _from_recon_cache(self, cache_keys, cache_file, openr=open):
        try:
            with openr(cache_file, 'r') as f:
                recondata = json.load(f)
                return dict((key, recondata.get(key)) for key in cache_keys)
        except IOError:
            self.logger.exception(_('Error reading recon cache file'))
        except ValueError:
            self.logger.exception(_('Error parsing recon cache file'))
        except Exception:
            self.logger.exception(_('Error retrieving recon data'))
        return dict((key, None) for key in cache_keys)
retrieve values from a recon cache file
dataset/ETHPy150Open openstack/swift/swift/common/middleware/recon.py/ReconMiddleware._from_recon_cache