From: Daniel Carl Date: Fri, 15 Apr 2016 11:08:29 +0000 (+0200) Subject: Write soup cache to disk after each page load. X-Git-Url: https://git.owens.tech/assets/static/git.owens.tech/assets/static/git.owens.tech/git?a=commitdiff_plain;h=f109546b2d59bb5d51dc645cd3454334dd984e87;p=vimb.git Write soup cache to disk after each page load. This allows new instances of vimb to pickup latest cache entries. --- diff --git a/src/main.c b/src/main.c index 5317404..6dbc6f6 100644 --- a/src/main.c +++ b/src/main.c @@ -811,6 +811,12 @@ static void webview_load_status_cb(WebKitWebView *view, GParamSpec *pspec) if (strncmp(uri, "about:", 6)) { history_add(HISTORY_URL, uri, webkit_web_view_get_title(view)); } +#ifdef FEATURE_SOUP_CACHE + /* Make sure the caches are written to file to be picked up by new + * browser instance. */ + soup_cache_flush(vb.config.soup_cache); + soup_cache_dump(vb.config.soup_cache); +#endif break; case WEBKIT_LOAD_FAILED: