summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-24 15:33:19 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-24 15:37:11 +0000
commit40cb70b845686236a6e7c73bc6e5f242cbb35da8 (patch)
tree5b90239753b8827424399badca1c9e04a737a524
parenta8ffa12cdf43a61a9112203944e6e0a626a048b0 (diff)
downloadnetsurf-40cb70b845686236a6e7c73bc6e5f242cbb35da8.tar.gz
netsurf-40cb70b845686236a6e7c73bc6e5f242cbb35da8.tar.bz2
netsurf_init: Use disc_cache_path if specified, otherwise platform path
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--desktop/netsurf.c5
-rw-r--r--docs/netsurf-options.md1
2 files changed, 5 insertions, 1 deletions
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index 7577e1ff8..547365b7c 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -164,7 +164,10 @@ nserror netsurf_init(const char *store_path)
hlcache_parameters.llcache.store.hysteresis = (hlcache_parameters.llcache.store.limit * 20) / 100;;
/* set the path to the backing store */
- hlcache_parameters.llcache.store.path = store_path;
+ hlcache_parameters.llcache.store.path =
+ nsoption_charp(disc_cache_path) ?
+ nsoption_charp(disc_cache_path) :
+ store_path;
/* image handler bitmap cache */
ret = image_cache_init(&image_cache_parameters);
diff --git a/docs/netsurf-options.md b/docs/netsurf-options.md
index 4e87d9b67..5a723c76b 100644
--- a/docs/netsurf-options.md
+++ b/docs/netsurf-options.md
@@ -42,6 +42,7 @@ General Options
memory_cache_size | int | 12MiB | Preferred maximum size of memory cache in bytes.
disc_cache_size | uint | 1GiB | Preferred expiry size of disc cache in bytes.
disc_cache_age | int | 28 | Preferred expiry age of disc cache in days.
+ disc_cache_path | string | NULL | Path to disc cache, NULL means to use system path |
block_advertisements | bool | false | Whether to block advertisements
do_not_track | bool | false | Disable website tracking [1]
send_referer | bool | true | Whether to send the referer HTTP header.