def _read_from_cache(cache_name, uid):
	with open(os.path.join(profiles.get_world_directory(WORLD_INFO['id']), '%s_history.dat' % cache_name)) as f:
		for item in [json.loads(s) for s in f]:
			if item['uid'] == uid:
				item['_on_disk'] = False
				item['date'] = WORLD_INFO['ticks']
				ITEMS_HISTORY[item['uid']].update(item)

				logging.debug('Cache: Loaded item %s from cache.' % uid)
				return item
dataset/ETHPy150Open flags/Reactor-3/cache.py/_read_from_cache/original