def get_authentication_info(self, identifier):
account_info = None<EOL>ch = self.cache_handler<EOL>def query_authc_info(self):<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>.format(identifier))<EOL>logger.debug(msg)<EOL>account_info = self.account_store.get_authc_info(identifier)<EOL>if account_info is None:<EOL><INDENT>msg = "<STR_LIT>".format(identifier)<EOL>raise ValueError(msg)<EOL><DEDENT>return account_info<EOL><DEDENT>try:<EOL><INDENT>msg2 = ("<STR_LIT>"<EOL>.format(identifier))<EOL>logger.debug(msg2)<EOL>account_info = ch.get_or_create(domain='<STR_LIT>' + self.name,<EOL>identifier=identifier,<EOL>creator_func=query_authc_info,<EOL>creator=self)<EOL><DEDENT>except AttributeError:<EOL><INDENT>account_info = query_authc_info(self)<EOL><DEDENT>except ValueError:<EOL><INDENT>msg3 = ("<STR_LIT>"<EOL>"<STR_LIT>".format(identifier))<EOL>logger.warning(msg3)<EOL><DEDENT>if account_info:<EOL><INDENT>account_info['<STR_LIT>'] = SimpleIdentifierCollection(source_name=self.name,<EOL>identifier=identifier)<EOL><DEDENT>return account_info<EOL>
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