--- babl-0.1.24/babl/babl-cache.c.orig	2017-03-12 20:20:21.274469244 +0200
+++ babl-0.1.24/babl/babl-cache.c	2017-03-12 20:21:55.460468841 +0200
@@ -78,7 +78,9 @@
 
   strncpy (path, FALLBACK_CACHE_PATH, 4096);
 #ifndef _WIN32
-  if (getenv ("HOME"))
+  if (getenv ("XDG_CACHE_HOME"))
+    sprintf (path, "%s/babl/babl-fishes", getenv("XDG_CACHE_HOME"));
+  else if (getenv ("HOME"))
     sprintf (path, "%s/.cache/babl/babl-fishes", getenv("HOME"));
 #else
 {
