code: def get_authentication_info(self, identifier):
          
          account_info = None
          ch = self.cache_handler
  
          def query_authc_info(self):
              msg = ("Could not obtain cached credentials for [{0}].  "
                     "Will try to acquire credentials from account store."
                     .format(identifier))
              logger.debug(msg)
  
              # account_info is a dict
              account_info = self.account_store.get_authc_info(identifier)
  
              if account_info is None:
                  msg = "Could not get stored credentials for {0}".format(identifier)
                  raise ValueError(msg)
  
              return account_info
  
          try:
              msg2 = ("Attempting to get cached credentials for [{0}]"
                      .format(identifier))
              logger.debug(msg2)
  
              # account_info is a dict
              account_info = ch.get_or_create(domain='authentication:' + self.name,
                                              identifier=identifier,
                                              creator_func=query_authc_info,
                                              creator=self)
  
          except AttributeError:
              # this means the cache_handler isn't configured
              account_info = query_authc_info(self)
          except ValueError:
              msg3 = ("No account credentials found for identifiers [{0}].  "
                      "Returning None.".format(identifier))
              logger.warning(msg3)
  
          if account_info:
              account_info['account_id'] = SimpleIdentifierCollection(source_name=self.name,
                                                                      identifier=identifier)
          return account_info
docs: The default authentication caching policy is to cache an account's
          credentials that are queried from an account store, for a specific
          user, so to facilitate any subsequent authentication attempts for
          that user. Naturally, in order to cache one must have a CacheHandler.
          If a user were to fail to authenticate, perhaps due to an
          incorrectly entered password, during the the next authentication
          attempt (of that user id) the cached account will be readily
          available from cache and used to match credentials, boosting
          performance.
  
          :returns: an Account object