commit 3f861122ba82cf0d60cc879f90a2fa1833ab25c4 Author: Isis Lovecruft isis@torproject.org Date: Tue Jan 28 16:36:22 2014 +0000
Set Mako template collection cache limit. --- lib/bridgedb/HTTPServer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py index 2668e31..dca2800 100644 --- a/lib/bridgedb/HTTPServer.py +++ b/lib/bridgedb/HTTPServer.py @@ -46,11 +46,13 @@ rtl_langs = ('ar', 'he', 'fa', 'gu_IN', 'ku') # due to potential speed increases. This means that the atimes of the Mako # template files aren't rechecked every time the template is requested # (otherwise, if they are checked, and the atime is newer, the template is -# recompiled). See: -# http://docs.makotemplates.org/en/latest/usage.html#setting-filesystem-checks +# recompiled). `collection_size` sets the number of compiled templates which +# are cached before the least recently used ones are removed. See: +# http://docs.makotemplates.org/en/latest/usage.html#using-templatelookup lookup = TemplateLookup(directories=[template_root], output_encoding='utf-8', - filesystem_checks=False) + filesystem_checks=False, + collection_size=500)
logging.debug("Set template root to %s" % template_root)
tor-commits@lists.torproject.org