public T get ( String key ) { SoftReference < T > ref = cacheMap . get ( key ) ; if ( ref != null ) { if ( ref . get ( ) == null ) { logger . debug ( "Cached item was cleared: " + key ) ; } return ref . get ( ) ; //maybe still be null } return null ; }
Retrieves an object from cache . If the object was cleared due to memory demand null will be returned .