code: protected synchronized void cacheToken(final Token token) {
  
  		log.debug("OAuthTokenManager.cacheToken");
  
  		// Parse token expires in seconds.
  		int tokenExpiresInSecs;
  		try {
  			tokenExpiresInSecs = Integer.parseInt(token.getExpires_in());
  		} catch (NumberFormatException exception) {
  			tokenExpiresInSecs = 0;
  		}
  
  		// Parse token expiration time
  		long tokenExpirationTime;
  		try {
  			tokenExpirationTime = Long.parseLong(token.getExpiration());
  		} catch (NumberFormatException exception) {
  			tokenExpirationTime = 0;
  		}
  
  		// Calculate token refresh time based on lifespan percentage offset.
  		long refreshBeforeExpirySecs = (long) (tokenExpiresInSecs * this.iamRefreshOffset);
  		long tokenRefreshTime = tokenExpirationTime - refreshBeforeExpirySecs;
  
  		token.setRefreshTime(tokenRefreshTime);
  		token.setExpirationTime(tokenExpirationTime);
  
  		setTokenCache(token);
  	}
docs: Add the Token object to in-memory cache
  
  @param token
  The IAM Token object