boon/src/main/java/org/boon/cache/ConcurrentLruCache.java
@Override
    public void put( KEY key, VALUE value ) {
        VALUE oldValue = map.put( key, value );
        if ( oldValue != null ) {
            removeThenAddKey( key );
        } else {
            addKey( key );
        }
        if ( map.size() > limit ) {
            map.remove( removeLast() );
        }
    }
@Override
    public void put( KEY key, VALUE value ) {
        VALUE oldValue = map.put( key, value );
        if ( oldValue != null ) {
            removeThenAddKey( key );
        } else {
            addKey( key );
        }
        if ( map.size() > limit ) {
            map.remove( removeLast() );
        }
    }
@ Override public void put ( KEY key , VALUE value ) { VALUE oldValue = map . put ( key , value ) ; if ( oldValue != null ) { removeThenAddKey ( key ) ; } else { addKey ( key ) ; } if ( map . size ( ) > limit ) { map . remove ( removeLast ( ) ) ; } }
Key
@param key the key
@param value the value
Key