private AlbumArt findArtInMemoryCaches ( DataReference artReference ) { // First see if we can find the new track in the hot cache as a hot cue for ( AlbumArt cached : hotCache . values ( ) ) { if ( cached . artReference . equals ( artReference ) ) { // Found a hot cue hit, use it. return cached ; } } // Not in the hot cache, see if it is in our LRU cache return artCache . get ( artReference ) ; }
Look for the specified album art in both the hot cache of loaded tracks and the longer - lived LRU cache .