aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 501803310..f7da316ce 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2991,7 +2991,8 @@ routerlist_descriptors_added(smartlist_t *sl)
* This is used only by the controller.
*/
int
-router_load_single_router(const char *s, uint8_t purpose, const char **msg)
+router_load_single_router(const char *s, uint8_t purpose, int cache,
+ const char **msg)
{
routerinfo_t *ri;
int r;
@@ -3017,6 +3018,9 @@ router_load_single_router(const char *s, uint8_t purpose, const char **msg)
return 0;
}
+ if (!cache) /* obey the preference of the controller */
+ ri->cache_info.do_not_cache = 1;
+
lst = smartlist_create();
smartlist_add(lst, ri);
routers_update_status_from_networkstatus(lst, 0);