Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.95 KB

README.adoc

File metadata and controls

65 lines (43 loc) · 1.95 KB

Ehcache 3 integration in Apache Shiro

This project will provide Ehcache 3 support in Apache Shiro

Build status: Ehcache@Cloudbees

Sample Configurations

To enable it in Shiro application use the following configuration:

[main]
 cacheManager = org.ehcache.integrations.shiro.EhcacheShiroManager
 securityManager.cacheManager = $cacheManager

To set custom Ehcache configuration file use the following configuration:

[main]
 cacheManager = org.ehcache.integrations.shiro.EhcacheShiroManager
 cacheManager.cacheManagerConfigFile = /path/to/custom/configuration.xml
 securityManager.cacheManager = $cacheManager

Cache Configuration Considerations

By default the CacheManager uses default Shiro specific EhCache configuration. If you wish to change the cache settings, or configure your own ehcache.xml or org.ehcache.CacheManager instance, you will need to configure the cache region to ensure that Sessions are handled correctly. You have to ensure that you have defined cache named shiro-activeSessionCache for Shiro’s needs.

Please have a look at the default configuration file before creating your own.

Maven Dependency

<dependency>
  <groupId>org.ehcache.integrations.shiro</groupId>
  <artifactId>shiro-ehcache3</artifactId>
  <version>1.0.0</version>
</dependency>

Shiro Support

This project works with Shiro 1.1.0 and above and requires Ehcache 3.1.3 and above.

Resources

Official Shiro documentation for:

Releases

Latest release

The latest release is 1.0.0.

Changelog

1.0.0

  • The first version was released on October 10th, 2016.