[gnome-documents/gnome-3-16] edit: Prevent WebKit2 from blowing away our cache
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/gnome-3-16] edit: Prevent WebKit2 from blowing away our cache
- Date: Wed, 22 Apr 2015 16:39:05 +0000 (UTC)
commit 103595481ef7135b172965c4c3e7e27cc735b5f6
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Apr 22 15:58:23 2015 +0200
edit: Prevent WebKit2 from blowing away our cache
https://bugzilla.gnome.org/show_bug.cgi?id=748303
src/edit.js | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/edit.js b/src/edit.js
index 88039eb..79ec4ff 100644
--- a/src/edit.js
+++ b/src/edit.js
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014 Red Hat, Inc.
+ * Copyright (c) 2013, 2014, 2015 Red Hat, Inc.
*
* Gnome Documents is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
@@ -51,6 +51,10 @@ const EditView = new Lang.Class({
this.widget.get_style_context().add_class('documents-scrolledwin');
let context = WebKit.WebContext.get_default();
+
+ let cacheDir = GLib.build_filenamev([GLib.get_user_cache_dir(), 'gnome-documents', 'webkit']);
+ context.set_disk_cache_directory(cacheDir);
+
let cookie_manager = context.get_cookie_manager();
let jarfile = GLib.build_filenamev([GLib.get_user_cache_dir(), 'gnome-documents', 'cookies.sqlite']);
cookie_manager.set_persistent_storage(jarfile, WebKit.CookiePersistentStorage.SQLITE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]