Details
Description
The org.xmpp.packet.JID class uses an internal Cache to prevent duplicate stringprepping. In the documentation that comes with the source, and by looking at the source, it's clear that a LRU (Least-Recently-Used) eviction policy is intended to be used.
There are only two operations being done on the cache: containsKey() and put().
containsKey() does not update the 'access order' of the cache. The only time that the access order gets modified, is when the original entry is put in the cache. In effect, a FIFO (first in first out)) eviction policy has been implemented.
Issue Links
- is related to
-
JM-1453
JID class cache should not use one single mutex to synchronize all access on.
-
Won't fix this issue, as accepting (and enforcing) FIFO behavior will allow for a very simple and fast cache implementation (see
JM-1453). The benefits of LRU do not outweigh the performance boost that was introduced byJM-1453.JM-1453). The benefits of LRU do not outweigh the performance boost that was introduced byJM-1453.