@Override
    public V put(final K key, final V value) {
        // in case the underlying Map is not running with accessOrder==true, the map won't notice any changes
        // of existing keys, so for the normal BOUNDED mode we remove and put the value to get its order updated.
        if (opMode == OperationModes.BOUNDED && containsKey(key)) {
            // avoid trigger the remove notification
            final V oldVal = super.remove(key);
            put(key, value);
            return oldVal;
        }

        return super.put(key, value);
    }
Base class for caching objects. Don't mix up with a geocache !
<br>
The LeastRecentlyUsedMap is basically a LinkedHashMap which can be configured to have certain modes of operation:
<ul>
<li> LRU_CACHE means that the elements are updated in the LinkedList on every get() access,
     so the objects that are dropped are the ones that haven't been used the longest</li>
<li> BOUNDED means that objects are updated only when they are put,
     so the objects that are dropped are the ones that haven't been written the longest</li>
</ul>
main/src/main/java/cgeo/geocaching/utils/LeastRecentlyUsedMap.java