diff options
author | juga0 <juga@riseup.net> | 2018-11-07 12:19:20 +0000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-03-26 17:41:02 +1000 |
commit | 76271347438ff03796a9424019860332f50c5134 (patch) | |
tree | f6f1f04133009a6dbffc3d76dae8597099ce02d6 | |
parent | 4d3502e45bc9b0da91b32c362a7995f33cee0539 (diff) | |
download | tor-76271347438ff03796a9424019860332f50c5134.tar.gz tor-76271347438ff03796a9424019860332f50c5134.zip |
bwauth: increment bw file cache lifetime
Increment bw file cache lifetime when serving it by HTTP.
And add a constant to define that lifetime.
-rw-r--r-- | src/feature/dircache/dircache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/dircache/dircache.c b/src/feature/dircache/dircache.c index e5ea9f73b3..0f92dfaea1 100644 --- a/src/feature/dircache/dircache.c +++ b/src/feature/dircache/dircache.c @@ -49,7 +49,8 @@ #define ROUTERDESC_BY_DIGEST_CACHE_LIFETIME (48*60*60) #define ROBOTS_CACHE_LIFETIME (24*60*60) #define MICRODESC_CACHE_LIFETIME (48*60*60) - +/* Bandwidth files change every hour. */ +#define BANDWIDTH_CACHE_LIFETIME (30*60) /** Parse an HTTP request string <b>headers</b> of the form * \verbatim * "\%s [http[s]://]\%s HTTP/1..." @@ -1453,7 +1454,6 @@ handle_get_next_bandwidth(dir_connection_t *conn, find_best_compression_method(args->compression_supported, 1); if (options->V3BandwidthsFile) { - int lifetime = 60; char *bandwidth = read_file_to_str(options->V3BandwidthsFile, RFTS_IGNORE_MISSING, NULL); if (bandwidth != NULL) { |