# HG changeset patch # User Boris Feld # Date 2017-10-11 02:14:33 # Node ID 625202a44d88d05f4ccbc573bb3149ab7d702324 # Parent dcd6b6625e9807546cbe6cd4442802ac66e3c821 configitems: register the 'web.cache' config diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -727,6 +727,9 @@ coreconfigitem('web', 'allow_push', coreconfigitem('web', 'allowzip', default=None, ) +coreconfigitem('web', 'cache', + default=True, +) coreconfigitem('web', 'accesslog', default='-', ) diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -436,7 +436,7 @@ class hgweb(object): # Don't enable caching if using a CSP nonce because then it wouldn't # be a nonce. - if rctx.configbool('web', 'cache', True) and not rctx.nonce: + if rctx.configbool('web', 'cache') and not rctx.nonce: caching(self, req) # sets ETag header or raises NOT_MODIFIED if cmd not in webcommands.__all__: msg = 'no such method: %s' % cmd