tor_free(new_directory);
the_directory_is_dirty = 0;
+ /* Save the directory to disk so we re-load it quickly on startup.
+ */
+ dirserv_set_cached_directory(the_directory, time(NULL), 0);
+
return 0;
}
return -1;
}
runningrouters_is_dirty = 0;
+
+ /* We don't cache runnning-routers to disk, so there's no point in
+ * authdirservers caching it. */
+ /* dirserv_set_cached_directory(the_runningrouters, time(NULL), 1); */
+
return 0;
err:
tor_free(s);
/* Now that we know the signature is okay, and we have a
* publication time, cache the directory. */
- dirserv_set_cached_directory(str, published_on, 0);
+ if (!get_options()->AuthoritativeDir)
+ dirserv_set_cached_directory(str, published_on, 0);
if (!(tok = find_first_by_keyword(tokens, K_RECOMMENDED_SOFTWARE))) {
log_fn(LOG_WARN, "Missing recommended-software line from directory.");
/* Now that we know the signature is okay, and we have a
* publication time, cache the list. */
- dirserv_set_cached_directory(str, published_on, 1);
+ if (!get_options()->AuthoritativeDir)
+ dirserv_set_cached_directory(str, published_on, 1);
if (!(tok = find_first_by_keyword(tokens, K_ROUTER_STATUS))) {
if (!(tok = find_first_by_keyword(tokens, K_RUNNING_ROUTERS))) {