code: def check_update(from_currency, to_currency):
  	
  	if from_currency not in ccache: # if currency never get converted before
  		ccache[from_currency] = {}
  	if ccache[from_currency].get(to_currency) is None:
  		ccache[from_currency][to_currency] = {'last_update': 0}
  	last_update = float(ccache[from_currency][to_currency]['last_update'])
  	if time.time() - last_update >= 30 * 60: # if last update is more than 30 min ago
  		return True
  	return False
docs: check if last update is over 30 mins ago. if so return True to update, else False