Cservenak, Tamas created SHIRO-482:
--------------------------------------
Summary: EhCache API misuse prevents use of decorated caches
Key: SHIRO-482
URL: https://issues.apache.org/jira/browse/SHIRO-482
Project: Shiro
Issue Type: Bug
Components: Caching
Reporter: Cservenak, Tamas
Shiro's EhCacheManager poses some implicit requirements against Caches served
by EHCache CacheManager. Most notable, that EHCache manager instance registered
by CacheManager is *also a net.sf.ehcache.Cache instance*. This can be seen in
getCache method of EhCacheManager, as it uses CacheManager.getCache(String)
method instead of CacheManager.getEhcache(String) method to populate local
variable "cache" of type net.sf.ehcache.Ehcache.
This condition is not always true, especially when "cache decoration" [1]
feature of EHCache is used.
Proposed fix: one liner change of line 162 that currently yields
cache = manager.getCache(name);
to
cache = manager.getEhcache(name);
[1] http://ehcache.org/documentation/apis/cache-decorators
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)