def add(token_response)
      return unless token_response.instance_of? SuccessResponse
      logger.verbose('Adding successful TokenResponse to cache.')
      entry = CachedTokenResponse.new(@client, @authority, token_response)
      update_refresh_tokens(entry) if entry.mrrt?
      @token_cache.add(entry)
    end
def add(token_response)
      return unless token_response.instance_of? SuccessResponse
      logger.verbose('Adding successful TokenResponse to cache.')
      entry = CachedTokenResponse.new(@client, @authority, token_response)
      update_refresh_tokens(entry) if entry.mrrt?
      @token_cache.add(entry)
    end
Constructs a CacheDriver to interact with a token cache.

 @param String authority
   The URL of the authority endpoint.
 @param ClientAssertion|ClientCredential|etc client
   The credentials representing the calling application. We need this
   instead of just the client id so that the tokens can be refreshed if
   necessary.
 @param TokenCache token_cache
   The cache implementation to store tokens.
 @optional Fixnum expiration_buffer_sec
   The number of seconds to use as a leeway when dealing with cache expiry.

 Checks if a TokenResponse is successful and if so adds it to the token
 cache for future retrieval.

 @param SuccessResponse token_response
   The successful token response to be cached. If it is not successful, it
   fails silently.