|
@@ -1867,6 +1867,7 @@ DEFAULTS = {
|
|
'remote_net_dir': None,
|
|
'remote_net_dir': None,
|
|
'num_additional_eventloops': None,
|
|
'num_additional_eventloops': None,
|
|
'log_throughput': False,
|
|
'log_throughput': False,
|
|
|
|
+ 'dircache': True,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1936,7 +1937,10 @@ class TorEnviron(chutney.Templating.Environ):
|
|
return my['socksport_base'] + my['nodenum']
|
|
return my['socksport_base'] + my['nodenum']
|
|
|
|
|
|
def _get_dirport(self, my):
|
|
def _get_dirport(self, my):
|
|
- return my['dirport_base'] + my['nodenum']
|
|
|
|
|
|
+ if my['dircache'] is True:
|
|
|
|
+ return my['dirport_base'] + my['nodenum']
|
|
|
|
+ else:
|
|
|
|
+ return 0
|
|
|
|
|
|
def _get_extorport(self, my):
|
|
def _get_extorport(self, my):
|
|
return my['extorport_base'] + my['nodenum']
|
|
return my['extorport_base'] + my['nodenum']
|
|
@@ -1984,6 +1988,9 @@ class TorEnviron(chutney.Templating.Environ):
|
|
def _get_daemon_int(self, my):
|
|
def _get_daemon_int(self, my):
|
|
return 1 if self['daemon'] else 0
|
|
return 1 if self['daemon'] else 0
|
|
|
|
|
|
|
|
+ def _get_dircache_int(self, my):
|
|
|
|
+ return 1 if self['dircache'] else 0
|
|
|
|
+
|
|
# A hs generates its key on first run,
|
|
# A hs generates its key on first run,
|
|
# so check for it at the last possible moment,
|
|
# so check for it at the last possible moment,
|
|
# but cache it in memory to avoid repeatedly reading the file
|
|
# but cache it in memory to avoid repeatedly reading the file
|