[
https://issues.apache.org/jira/browse/JSPWIKI-792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13743530#comment-13743530
]
Harry Metske commented on JSPWIKI-792:
--------------------------------------
Just a few notes as a reminder (mostly for myself) :
There is semantic difference between oscache and ehcache.
*OSCache* : cache-miss ==> throws a NeedsRefreshException (either the cache
entry was in cache but expired, or entry was never in the cache).
CachingProvider (and others) rely on this behavior. And more annoying, the
NeedsRefreshException (NRE) holds a reference to the expired cache-element.
*EhCache* : cache-miss ==> no exception, just the returned element is a null.
You could use the isKeyInCache(Object key) to find out if it was a present but
expired element, or the element was never in the cache. Once the element in the
cache is expired you cannot get it anymore.
CachingProvider (and other classes as well) is full of these try/catch blocks
handling the NRE's and sometimes returning stale content from cache.
Also CachingProvider has become a bit complex because it handles the situation
where pages are deleted/modified outside jspwiki, do we really need this ?
So it is not a "change all oscache => ehcache", we will probably end up with
slightly different behavior too.
And still to figure out cache-scopes, with EhCache you normally use
CacheManager.getInstance().getCache("name"), and doing this in different
(unrelated) classes will give you the same cache. What about oscache, there is
no CacheManager or something like that. So, when replacing oscaches with
ehcaches make sure caches don't get intermixed between unrelated classes.
> Replace OpenSymphony's oscache with ehcache
> -------------------------------------------
>
> Key: JSPWIKI-792
> URL: https://issues.apache.org/jira/browse/JSPWIKI-792
> Project: JSPWiki
> Issue Type: Improvement
> Reporter: Glen Mazza
> Assignee: Harry Metske
>
> OpenSymphony website is dead, ehcache seems common today.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira