Repository: shiro-site Updated Branches: refs/heads/master 7cfde39bc -> 7df034f5a
Converted banner and cache manager pages to vtl and markdown Project: http://git-wip-us.apache.org/repos/asf/shiro-site/repo Commit: http://git-wip-us.apache.org/repos/asf/shiro-site/commit/4e7feb44 Tree: http://git-wip-us.apache.org/repos/asf/shiro-site/tree/4e7feb44 Diff: http://git-wip-us.apache.org/repos/asf/shiro-site/diff/4e7feb44 Branch: refs/heads/master Commit: 4e7feb44a92113c91beb9f8b2e010c0021a6a22c Parents: 7cfde39 Author: Brian Demers <[email protected]> Authored: Fri Oct 21 16:56:52 2016 -0400 Committer: Brian Demers <[email protected]> Committed: Fri Oct 21 16:56:52 2016 -0400 ---------------------------------------------------------------------- banner.html | 3 --- banner.html.vtl | 1 + cachemanager.html | 33 --------------------------------- cachemanager.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 36 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/shiro-site/blob/4e7feb44/banner.html ---------------------------------------------------------------------- diff --git a/banner.html b/banner.html deleted file mode 100644 index 282658b..0000000 --- a/banner.html +++ /dev/null @@ -1,3 +0,0 @@ -<div id="asf_logo"> -<a style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;" href="http://www.apache.org" title="The Apache Software Foundation" float:right="float:right" width:_210pxdisplayblocktext-indent-5000pxtext-decorationnoneline-height60px="width:_210pxdisplayblocktext-indent-5000pxtext-decorationnoneline-height60px" margin-top:_15px="margin-top:_15px" margin-right:_10px="margin-right:_10px">ASF</a> -</div> http://git-wip-us.apache.org/repos/asf/shiro-site/blob/4e7feb44/banner.html.vtl ---------------------------------------------------------------------- diff --git a/banner.html.vtl b/banner.html.vtl new file mode 100644 index 0000000..dc7aa80 --- /dev/null +++ b/banner.html.vtl @@ -0,0 +1 @@ +#redirect('index.html', 'Main Page') \ No newline at end of file http://git-wip-us.apache.org/repos/asf/shiro-site/blob/4e7feb44/cachemanager.html ---------------------------------------------------------------------- diff --git a/cachemanager.html b/cachemanager.html deleted file mode 100644 index 0bc8672..0000000 --- a/cachemanager.html +++ /dev/null @@ -1,33 +0,0 @@ -<p>Shiro has three important cache interfaces:</p> - -<ul><li><tt><a class="external-link" href="static/current/apidocs/org/apache/shiro/cache/CacheManager.html">CacheManager</a></tt></li><li><tt><a class="external-link" href="static/current/apidocs/org/apache/shiro/cache/Cache.html">Cache</a></tt></li><li><tt><a class="external-link" href="static/current/apidocs/org/apache/shiro/cache/CacheManagerAware.html">CacheManagerAware</a></tt></li></ul> - -<p>A <tt>CacheManager</tt> returns <tt>Cache</tt> instances and various Shiro components use those <tt>Cache</tt> instances to cache data as necessary. Any Shiro<br clear="none"> -component that implements <tt>CacheManager</tt> will automatically receive a configured <tt>CacheManager</tt>, where it can be used to acquire <tt>Cache</tt> instances.</p> - -<p>The Shiro <a href="securitymanager.html" title="SecurityManager">SecurityManager</a> implementations and all <tt><a class="external-link" href="static/current/apidocs/org/apache/shiro/realm/AuthorizingRealm.html">AuthorizingRealm</a></tt> implementations implement CacheManagerAware. If you set the <tt>CacheManager</tt> on the <tt>SecurityManager</tt>, it will in turn set it on the various Realms that implement CacheManagerAware as well (OO delegation). For example, in shiro.ini:</p> - -<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>example shiro.ini CacheManger configuration</b></div><div class="codeContent panelContent"> -<pre class="code-java"> - -securityManager.realms = $myRealm1, $myRealm2, ..., $myRealmN -... -cacheManager = my.implementation.of.CacheManager -... -securityManager.cacheManager = $cacheManager -# at <span class="code-keyword">this</span> point, the securityManager and all CacheManagerAware -# realms have been set with the cacheManager instance -</pre> -</div></div> - -<p>We have an out-of-the-box <tt><a class="external-link" href="static/current/apidocs/org/apache/shiro/cache/ehcache/EhCacheManager.html">EhCacheManager</a></tt> implementation, so you can use that today if you wanted. Otherwise, you can implement your own <tt>CacheManager</tt> (e.g. with Coherence, etc) and configure it as above, and you'll be good to go.</p> - -<h3><a name="CacheManager-AuthorizationCacheInvalidation"></a>Authorization Cache Invalidation</h3> - -<p>Finally note that <tt><a class="external-link" href="static/current/apidocs/org/apache/shiro/realm/AuthorizingRealm.html">AuthorizingRealm</a></tt> has a {{<a class="external-link" href="static/current/apidocs/org/apache/shiro/realm/AuthorizingRealm.html#clearCachedAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)">clearCachedAuthorizationInfo method</a> that can be called by subclasses to evict the cached authzInfo for a particular account. It is usually called by custom logic if the corresponding account's authz data has changed (to ensure the next authz check will pick up the new data).</p> - -<h2><a name="CacheManager-Lendahandwithdocumentation"></a>Lend a hand with documentation </h2> - -<p>While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro. </p> - -<p>The easiest way to contribute your documentation is to send it to the <a class="external-link" href="http://shiro-user.582556.n2.nabble.com/" rel="nofollow">User Forum</a> or the <a href="mailing-lists.html" title="Mailing Lists">User Mailing List</a>.</p> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/shiro-site/blob/4e7feb44/cachemanager.md ---------------------------------------------------------------------- diff --git a/cachemanager.md b/cachemanager.md new file mode 100644 index 0000000..c20a8e1 --- /dev/null +++ b/cachemanager.md @@ -0,0 +1,42 @@ +# Cache Manger + +Shiro has three important cache interfaces: + +* [`CacheManager`](static/current/apidocs/org/apache/shiro/cache/CacheManager.html) + +* [`Cache`] (static/current/apidocs/org/apache/shiro/cache/Cache.html) + +* [`CacheManagerAware`] (static/current/apidocs/org/apache/shiro/cache/CacheManagerAware.html) + +A `CacheManager` returns `Cache` instances and various Shiro components use those `Cache<` instances to cache data as necessary. Any Shiro<br clear="none"> +component that implements `CacheManager` will automatically receive a configured `CacheManager`, where it can be used to acquire `Cache` instances. + +The Shiro [`SecurityManager`](securitymanager.html) implementations and all [`AuthorizingRealm`](static/current/apidocs/org/apache/shiro/realm/AuthorizingRealm.html) implementations implement CacheManagerAware. If you set the `CacheManager` on the `SecurityManager`, it will in turn set it on the various Realms that implement CacheManagerAware as well (OO delegation). For example, in shiro.ini: + +**example shiro.ini CacheManger configuration** + +``` ini + +securityManager.realms = $myRealm1, $myRealm2, ..., $myRealmN +... +cacheManager = my.implementation.of.CacheManager +... +securityManager.cacheManager = $cacheManager +# at this point, the securityManager and all CacheManagerAware +# realms have been set with the cacheManager instance +``` + +We have an out-of-the-box [`EhCacheManager`](static/current/apidocs/org/apache/shiro/cache/ehcache/EhCacheManager.html) implementation, so you can use that today if you wanted. Otherwise, you can implement your own `CacheManager` (e.g. with Coherence, etc) and configure it as above, and you'll be good to go. + +<a name="CacheManager-AuthorizationCacheInvalidation"></a> +###Authorization Cache Invalidation + +Finally note that [`AuthorizingRealm`](static/current/apidocs/org/apache/shiro/realm/AuthorizingRealm.html) has a [`clearCachedAuthorizationInfo`](static/current/apidocs/org/apache/shiro/realm/AuthorizingRealm.html#clearCachedAuthorizationInfo%28org.apache.shiro.subject.PrincipalCollection%29) method that can be called by subclasses to evict the cached authzInfo for a particular account. It is usually called by custom logic if the corresponding account's authz data has changed (to ensure the next authz check will pick up the new data). + +<a name="CacheManager-Lendahandwithdocumentation"></a> +###Lend a hand with documentation + +While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro. + +The easiest way to contribute your documentation is to send it to the <a class="external-link" href="http://shiro-user.582556.n2.nabble.com/" rel="nofollow">User Forum</a> or the <a href="mailing-lists.html" title="Mailing Lists">User Mailing List</a>. + \ No newline at end of file
