netsurf_init: Use disc_cache_path if specified, otherwise platform path

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-02-24 15:33:19 +00:00
parent a8ffa12cdf
commit 40cb70b845
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74
2 changed files with 5 additions and 1 deletions

View File

@ -164,7 +164,10 @@ nserror netsurf_init(const char *store_path)
hlcache_parameters.llcache.store.hysteresis = (hlcache_parameters.llcache.store.limit * 20) / 100;; hlcache_parameters.llcache.store.hysteresis = (hlcache_parameters.llcache.store.limit * 20) / 100;;
/* set the path to the backing store */ /* 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 */ /* image handler bitmap cache */
ret = image_cache_init(&image_cache_parameters); ret = image_cache_init(&image_cache_parameters);

View File

@ -42,6 +42,7 @@ General Options
memory_cache_size | int | 12MiB | Preferred maximum size of memory cache in bytes. 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_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_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 block_advertisements | bool | false | Whether to block advertisements
do_not_track | bool | false | Disable website tracking [1] do_not_track | bool | false | Disable website tracking [1]
send_referer | bool | true | Whether to send the referer HTTP header. send_referer | bool | true | Whether to send the referer HTTP header.