src/java/org/apache/cassandra/cache/ConcurrentLinkedHashCache.java
/**
     * Initialize a cache with initial capacity set to 0
     *
     * @param weightedCapacity cache weighted capacity
     * @param weigher The weigher to use
     *
     * @param <K> key type
     * @param <V> value type
     *
     * @return initialized cache
     */
Initialize a cache with initial capacity set to 0
@param weightedCapacity cache weighted capacity
@param weigher The weigher to use

@param  key type
@param  value type

@return initialized cache
Initialize a cache with initial capacity set to 0 @param weightedCapacity cache weighted capacity @param weigher The weigher to use @param key type @param value type @return initialized cache
public static <K, V> ConcurrentLinkedHashCache<K, V> create(int weightedCapacity, Weigher<V> weigher)
    {
        ConcurrentLinkedHashMap<K, V> map = new ConcurrentLinkedHashMap.Builder<K, V>()
                                            .weigher(weigher)
                                            .initialCapacity(0)
                                            .maximumWeightedCapacity(weightedCapacity)
                                            .concurrencyLevel(DEFAULT_CONCURENCY_LEVEL)
                                            .build();
        return new ConcurrentLinkedHashCache<K, V>(map);
    }
public static < K , V > ConcurrentLinkedHashCache < K , V > create ( int weightedCapacity , Weigher < V > weigher ) { ConcurrentLinkedHashMap < K , V > map = new ConcurrentLinkedHashMap . Builder < K , V > ( ) . weigher ( weigher ) . initialCapacity ( 0 ) . maximumWeightedCapacity ( weightedCapacity ) . concurrencyLevel ( DEFAULT_CONCURENCY_LEVEL ) . build ( ) ; return new ConcurrentLinkedHashCache < K , V > ( map ) ; }
Initialize a cache with initial capacity set to 0
 @param weightedCapacity cache weighted capacity
 @param weigher The weigher to use
Initialize a cache with initial capacity set to 0 @param weightedCapacity cache weighted capacity @param weigher The weigher to use