ui/src/main/java/ucar/nc2/ui/image/PictureCache.java
public static synchronized void add( URL url, SourcePicture sp ) {
		Tools.log("PictureCache.add: " + url.toString() );
		if ( sp.getSourceBufferedImage() == null ) {
			Tools.log ("PictureCache.add: invoked with a null picture! Not cached!");
			return;
		}
		
		if ( ( maxCache < 1 ) ) {
			Tools.log("PictureCache.add: cache is diabled. Not adding picture.");
			return;
		}
		
		if ( isInCache( url ) ) {
			Tools.log( "Picture " + url.toString() + " is already in the cache. Not adding again.");
			return;
		}
		
		if ( pictureCache.size() >= maxCache )
			removeLeastPopular();
			
		if ( pictureCache.size() < maxCache )
			pictureCache.put( url.toString(), sp );
			
		//reportCache();	
	}
public static synchronized void add( URL url, SourcePicture sp ) {
		Tools.log("PictureCache.add: " + url.toString() );
		if ( sp.getSourceBufferedImage() == null ) {
			Tools.log ("PictureCache.add: invoked with a null picture! Not cached!");
			return;
		}
		
		if ( ( maxCache < 1 ) ) {
			Tools.log("PictureCache.add: cache is diabled. Not adding picture.");
			return;
		}
		
		if ( isInCache( url ) ) {
			Tools.log( "Picture " + url.toString() + " is already in the cache. Not adding again.");
			return;
		}
		
		if ( pictureCache.size() >= maxCache )
			removeLeastPopular();
			
		if ( pictureCache.size() < maxCache )
			pictureCache.put( url.toString(), sp );
			
		//reportCache();	
	}
store an image in the cache
@param url	The URL of the picture
@param sp	The picture to be stored