Initializes this realm and potentially enables a cache, depending on configuration.
<p/>
When this method is called, the following logic is executed:
<ol>
<li>If the {@link #setAuthorizationCache cache} property has been set, it will be
used to cache the AuthorizationInfo objects returned from {@link #getAuthorizationInfo}
method invocations.
All future calls to {@code getAuthorizationInfo} will attempt to use this cache first
to alleviate any potentially unnecessary calls to an underlying data store.</li>
<li>If the {@link #setAuthorizationCache 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 create an authorization
{@code cache}, and this newly created cache which will be used as specified in #1.</li>
<li>If neither the {@link #setAuthorizationCache (hunt.shiro.cache.Cache) cache}
or {@link #setCacheManager(hunt.shiro.cache.CacheManager) cacheManager}
properties are set, caching will be disabled and authorization look-ups will be delegated to
subclass implementations for each authorization check.</li>
</ol>
Initializes this realm and potentially enables a cache, depending on configuration. <p/> When this method is called, the following logic is executed: <ol> <li>If the {@link #setAuthorizationCache cache} property has been set, it will be used to cache the AuthorizationInfo objects returned from {@link #getAuthorizationInfo} method invocations. All future calls to {@code getAuthorizationInfo} will attempt to use this cache first to alleviate any potentially unnecessary calls to an underlying data store.</li> <li>If the {@link #setAuthorizationCache 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 create an authorization {@code cache}, and this newly created cache which will be used as specified in #1.</li> <li>If neither the {@link #setAuthorizationCache (hunt.shiro.cache.Cache) cache} or {@link #setCacheManager(hunt.shiro.cache.CacheManager) cacheManager} properties are set, caching will be disabled and authorization look-ups will be delegated to subclass implementations for each authorization check.</li> </ol>