Taher Alkhateeb commented on OFBIZ-6747:

Amazing Ben, in a few words you're opening my eyes to a whole bunch of ideas 
and I'm still reading on all the algorithms. Really fascinating stuff thank you 
for sharing. If you can also recommend any books that would be awesome.

A problem we'll face is that our code base is rather old and pretty much 
spaghetti patterns are everywhere and most of our code is a concrete 
implementation without interfaces. I have to think of how to wire this Cache 
interface with the rest of the architecture cleanly. Perhaps one way is to to 
try and apply the ConcurrentMap signature on all methods, then create an 
adapter if / when needed with the UtilCache to keep everything working smoothly 
as we disentangle references to the Util class or others. Phew hurts my head 
just to say that :)

> Replace ConcurrentLinkedHashMap by Caffeine
> -------------------------------------------
>                 Key: OFBIZ-6747
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6747
>             Project: OFBiz
>          Issue Type: Task
>            Reporter: Ben Manes
>            Assignee: Jacques Le Roux
>            Priority: Minor
> Similar to OFBIZ-3779, please consider upgrading the library used by 
> [UtilCache|https://github.com/apache/ofbiz/blob/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java]
>  (v1.2). The current version is 1.4.2 and is the last major release planned.
> The preferable alternative would be to upgrade to 
> [Caffeine|https://github.com/ben-manes/caffeine]. This is a Java 8 rewrite 
> based on what I've learned since developing CLHM and Guava's cache. As 
> expected it provides [superior 
> performance|https://github.com/ben-manes/caffeine/wiki/Benchmarks]. It also 
> provides a [near 
> optimal|https://github.com/ben-manes/caffeine/wiki/Efficiency] eviction 
> policy.

This message was sent by Atlassian JIRA

Reply via email to