It looks like webkit is placing some cache in ~/.local/share/webkit ($XDG_DATA_HOME). That should probably go in ~/.cache/webkit ($XDG_CACHE_HOME)
There are three places where XDG env vars are used: WebKit/gtk/webkit/webkitapplicationcache.cpp: * $XDG_CACHE_HOME/webkitgtk/applications and cannot be modified. WebKit/gtk/webkit/webkiticondatabase.cpp: * ~/.local/share/webkit/icondatabase, depending on XDG_DATA_HOME. WebKit/gtk/webkit/webkitwebsettings.cpp: * "enable-html5-local-storage". The default path is $XDG_DATA_HOME/webkit/databases/. The icon database can be considered "cache". The HTML5 local storage can't, and sould remain where it is by default. However, it can be changed by the application via the "html5-local-storage-database-path" property in WebKitWebSettings. I'm going to prepare a patch to change the icon database path.
Created attachment 219058 [details] Patch
BTW, found more places where XDG_DATA_HOME is used, but they seem to be persistent data that shouldn't be moved to cache: $ git grep g_get_user_data_dir Source/WebKit/gtk/webkit/webkitglobals.cpp: GOwnPtr<gchar> databaseDirectory(g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL)); Source/WebKit/gtk/webkit/webkitglobals.cpp: GOwnPtr<gchar> iconDatabasePath(g_build_filename(g_get_user_data_dir(), "webkit", "icondatabase", NULL)); Source/WebKit/gtk/webkit/webkitwebsettings.cpp: GOwnPtr<gchar> localStoragePath(g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL)); Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp: * default directory for the platform (see g_get_user_data_dir()). Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp: GOwnPtr<gchar> databaseDirectory(g_build_filename(g_get_user_data_dir(), "webkitgtk", "databases", NULL)); Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp: GOwnPtr<gchar> databaseDirectory(g_build_filename(g_get_user_data_dir(), "webkitgtk", "icondatabase", NULL)); Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp: GOwnPtr<gchar> storageDirectory(g_build_filename(g_get_user_data_dir(), "webkitgtk", "localstorage", NULL)); Tools/DumpRenderTree/gtk/DumpRenderTree.cpp: GOwnPtr<gchar> localStoragePath(g_build_filename(g_get_user_data_dir(), "DumpRenderTreeGtk", "databases", NULL)); Tools/DumpRenderTree/gtk/DumpRenderTree.cpp: GOwnPtr<char> fallback(g_build_filename(g_get_user_data_dir(), "gtkwebkitdrt", "databases", NULL)); Tools/GtkLauncher/main.c: iconDatabasePath = g_build_filename(g_get_user_data_dir(), "webkit", "icondatabase", NULL);
Created attachment 219658 [details] Patch
Comment on attachment 219658 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=219658&action=review The change looks good to me. > Source/WebKit/gtk/ChangeLog:10 > + The format of the ChangeLog is not correct. You have to use Tools/Scripts/prepare-Changelog to properly generate it. > Source/WebKit2/ChangeLog:9 > + Ditto. > Tools/ChangeLog:9 > + Ditto.
Thanks. The inclusion of the git log message confused me.
Created attachment 219740 [details] Patch
Comment on attachment 219740 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=219740&action=review Looks good, but a few small suggestions before landing this. You can just upload a new version with the Reviewed by line filled in and then I can commit it with the commit queue. > Source/WebKit/gtk/ChangeLog:3 > + https://bugs.webkit.org/show_bug.cgi?id=123458 This changelog is missing a newline. > Source/WebKit2/ChangeLog:3 > + [GTK] Put cache files in XDG_CACHE_HOME > + https://bugs.webkit.org/show_bug.cgi?id=123458 This one too. > Tools/GtkLauncher/main.c:242 > - iconDatabasePath = g_build_filename(g_get_user_data_dir(), "webkit", "icondatabase", NULL); > + iconDatabasePath = g_build_filename(g_get_user_cache_dir(), "webkit", "icondatabase", NULL); It's probably a good moment to actually put this into a GtkLauncher subdirectory instead of "webkit"
Created attachment 221479 [details] Patch
Comment on attachment 221479 [details] Patch Rejecting attachment 221479 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 221479, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: t/webkitglobals.cpp.rej patching file Source/WebKit/gtk/webkit/webkiticondatabase.cpp patching file Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp Hunk #1 FAILED at 122. 1 out of 1 hunk FAILED -- saving rejects to file Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp.rej patching file Tools/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Tools/GtkLauncher/main.c Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.appspot.com/results/6529999087599616
Created attachment 222120 [details] Patch
Comment on attachment 222120 [details] Patch Clearing flags on attachment: 222120 Committed r162714: <http://trac.webkit.org/changeset/162714>
All reviewed patches have been landed. Closing bug.