Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java	(revision 31339)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java	(revision 31371)
@@ -97,4 +97,15 @@
 
     /**
+     * Creates tile identifier that is unique among all tile sources, but the same tile will always
+     * get the same identifier. Used for creation of cache key.
+     *
+     * @param zoom
+     * @param tilex
+     * @param tiley
+     * @return tile identifier
+     */
+    String getTileId(int zoom, int tilex, int tiley);
+
+    /**
      * Specifies how large each tile is.
      * @return The size of a single tile in pixels. -1 if default size should be used
@@ -145,4 +156,9 @@
     public Point latLonToXY(double lat, double lon, int zoom);
 
+    /**
+     * @param point
+     * @param zoom
+     * @return transforms longitude and latitude to pixel space (as if all tiles at specified zoom level where joined)
+     */
     public Point latLonToXY(ICoordinate point, int zoom);
 
@@ -172,4 +188,11 @@
     public ICoordinate XYToLatLon(Point point, int zoom);
 
+    /**
+     *
+     * @param x
+     * @param y
+     * @param zoom
+     * @return WGS84 Coordinates of given point
+     */
     public ICoordinate XYToLatLon(int x, int y, int zoom);
 
@@ -200,4 +223,10 @@
     public TileXY latLonToTileXY(double lat, double lon, int zoom);
 
+    /**
+     *
+     * @param point
+     * @param zoom
+     * @return x and y tile indices
+     */
     public TileXY latLonToTileXY(ICoordinate point, int zoom);
 
@@ -227,6 +256,18 @@
     public ICoordinate tileXYToLatLon(TileXY xy, int zoom);
 
+    /**
+     *
+     * @param tile
+     * @return WGS84 coordinates of given tile
+     */
     public ICoordinate tileXYToLatLon(Tile tile);
 
+    /**
+     *
+     * @param x
+     * @param y
+     * @param zoom
+     * @return WGS84 coordinates of given tile
+     */
     public ICoordinate tileXYToLatLon(int x, int y, int zoom);
 
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java	(revision 31339)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java	(revision 31371)
@@ -278,4 +278,9 @@
     }
 
+    @Override
+    public String getTileId(int zoom, int tilex, int tiley) {
+        return this.baseUrl + "/" + zoom + "/" + tilex + "/" + tiley;
+    }
+
     private int getTileMax(int zoom) {
         return (int)Math.pow(2.0, zoom) - 1;
