Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The response cache added in ZOOKEEPER-3180 is fairly bare bones. It does its job but there is room for experimentation and improvement. From the issue pull request (https://github.com/apache/zookeeper/pull/684):
*"the alternate eviction policies you outline and that LinkedHashMap allows. I see three reasonable paths here,
Merge this pr as it is (perhaps rename LRUCache to just Cache) and open a new JIRA to explore future paths.
I add another property that lets one toggle between insertion order and access order with the current implementation as the default.
Drop LinkedHashMap entirely and go with something like a guava Cache."
It was merged with path 1 chosen but I remain interested in the optimizations that were suggested.