Index: /trunk/src/org/openstreetmap/josm/io/CacheFiles.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 4817)
+++ /trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 4818)
@@ -59,9 +59,11 @@
 
     public CacheFiles(String ident, boolean isPlugin) {
-        String pref = isPlugin ? Main.pref.getPluginsDirectory().getPath() : Main.pref.getPreferencesDir();
+        String pref = isPlugin ? 
+                Main.pref.getPluginsDirectory().getPath() + File.separator + "cache" :
+                Main.pref.getCacheDirectory().getPath();
 
         boolean dir_writeable;
         this.ident = ident;
-        String cacheDir = Main.pref.get("cache." + ident + "." + "path", pref + "/" + ident + "/cache/");
+        String cacheDir = Main.pref.get("cache." + ident + "." + "path", pref + File.separator + ident + File.separator);
         this.dir = new File(cacheDir);
         try {
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 4817)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 4818)
@@ -449,5 +449,5 @@
         try {
             MirroredInputStream is = new MirroredInputStream(url,
-                    new File(Main.pref.getPreferencesDir(), "images").toString());
+                    new File(Main.pref.getCacheDirectory(), "images").getPath());
             switch (type) {
                 case SVG:
