Initializes this realm and potentially enables an authentication cache, depending on configuration. Based on
the availability of an authentication cache, this class functions as follows:
<ol>
<li>If the {@link #setAuthenticationCache cache} property has been set, it will be
used to cache the AuthenticationInfo objects returned from {@link #getAuthenticationInfo}
method invocations.
All future calls to {@link #getAuthenticationInfo} will attempt to use this cache first
to alleviate any potentially unnecessary calls to an underlying data store.</li>
<li>If the {@link #setAuthenticationCache cache} property has <b>not</b> been set,
the {@link #setCacheManager cacheManager} property will be checked.
If a {@code cacheManager} has been set, it will be used to eagerly acquire an authentication
{@code cache}, and this cache which will be used as specified in #1.</li>
<li>If neither the {@link #setAuthenticationCache (hunt.shiro.cache.Cache) authenticationCache}
or {@link #setCacheManager(hunt.shiro.cache.CacheManager) cacheManager}
properties are set, caching will not be utilized and authentication look-ups will be delegated to
subclass implementations for each authentication attempt.</li>
</ol>
<p/>
This method finishes by calling {@link #onInit()} is to allow subclasses to perform any init behavior desired.
Initializes this realm and potentially enables an authentication cache, depending on configuration. Based on the availability of an authentication cache, this class functions as follows: <ol> <li>If the {@link #setAuthenticationCache cache} property has been set, it will be used to cache the AuthenticationInfo objects returned from {@link #getAuthenticationInfo} method invocations. All future calls to {@link #getAuthenticationInfo} will attempt to use this cache first to alleviate any potentially unnecessary calls to an underlying data store.</li> <li>If the {@link #setAuthenticationCache cache} property has <b>not</b> been set, the {@link #setCacheManager cacheManager} property will be checked. If a {@code cacheManager} has been set, it will be used to eagerly acquire an authentication {@code cache}, and this cache which will be used as specified in #1.</li> <li>If neither the {@link #setAuthenticationCache (hunt.shiro.cache.Cache) authenticationCache} or {@link #setCacheManager(hunt.shiro.cache.CacheManager) cacheManager} properties are set, caching will not be utilized and authentication look-ups will be delegated to subclass implementations for each authentication attempt.</li> </ol> <p/> This method finishes by calling {@link #onInit()} is to allow subclasses to perform any init behavior desired.