code: public static int getMinimumCacheSize(int tileSize, double overdrawFactor) {
          Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
          return (int) Math.max(4, Math.round((2 + screenSize.getWidth() * overdrawFactor / tileSize)
                  * (2 + screenSize.getHeight() * overdrawFactor / tileSize)));
      }
docs: Compute the minimum cache size for a view, using the size of the screen.
  <p>
  Combine with <code>FrameBufferController.setUseSquareFrameBuffer(false);</code>
  
  @param tileSize       the tile size
  @param overdrawFactor the overdraw factor applied to the map view
  @return the minimum cache size for the view