Code example for SoftReference

Methods: clear

0
        } 
    } 
 
    public synchronized void invalidate() { 
        if (cacheStrategy != CacheStrategy.CACHE_ETERNALLY) {
            internalValue.clear();
        } 
    } 
 
    /** 
     * Describes possible caching strategies for metadata. 
     */ 
    public enum CacheStrategy { 
        /** 
         * Once the metadata value has been evaluated, do not re-evaluate the value until it is manually invalidated. 
         */ 
        CACHE_AFTER_FIRST_EVAL,
 
        /** 
         * Re-evaluate the metadata item every time it is requested 
Connect your IDE to all the code out there  Get Codota for Java