Hi everyone (new subscriber here),
For my current project, I've just made an implementation of CacheManager
based on Guava.
At first, i was using MemoryConstrainedCacheManager but it seems to
retain data in cache for too long for me.
I've seen others implementation (ehcache, terracotta) but these
dependencies are too large, i don't need all those features.
So i created mine, based on Guava caches [1]. It's convenient to me
since it's in-memory and thread-safe, Guava has a mature quality code
base and it support few tweaking options (sufficient to me):
concurrencyLevel
initialCapacity
maximumSize
maximumWeight
expireAfterAccess
expireAfterWrite
refreshAfterWrite
weakKeys
softValues
weakValues
recordStats
I've already programmed the whole thing (two little classes) and I was
wondering if the Shiro team would be interested to integrate this as a
new module. It's tiny (no dependency except guava and shiro-cache), it
could be just near ehcache support and be convenient for people who
don't have big caching issues.
It's not perfect but i did some Javadoc, followed your code-style, made
a minimalistic pom.xml.
[1] https://code.google.com/p/guava-libraries/wiki/CachesExplained
--
Brendan Le Ny, Code Lutin
[email protected]
(+33) 02 40 50 29 28