From: Armin Ronacher Date: Thu, 28 Aug 2014 07:10:22 +0000 (+0200) Subject: Increased cache size to 400. X-Git-Tag: 2.8~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85820fceb83569df62fa5e6b9b0f2f76b7c6a3cf;p=thirdparty%2Fjinja.git Increased cache size to 400. --- diff --git a/CHANGES b/CHANGES index d4f3c3bd..8d9802a1 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,7 @@ Version 2.8 - If unmarshalling of cached data fails the template will be reloaded now. - Implemented a block ``set`` tag. +- Default cache size was incrased to 400 from a low 50. Version 2.7.3 ------------- diff --git a/jinja2/environment.py b/jinja2/environment.py index 67a3d0ef..06156b8a 100644 --- a/jinja2/environment.py +++ b/jinja2/environment.py @@ -193,12 +193,15 @@ class Environment(object): The template loader for this environment. `cache_size` - The size of the cache. Per default this is ``50`` which means - that if more than 50 templates are loaded the loader will clean + The size of the cache. Per default this is ``400`` which means + that if more than 400 templates are loaded the loader will clean out the least recently used template. If the cache size is set to ``0`` templates are recompiled all the time, if the cache size is ``-1`` the cache will not be cleaned. + .. versionchanged:: 2.8 + The cache size was increased to 400 from a low 50. + `auto_reload` Some loaders load templates from locations where the template sources may change (ie: file system or database). If @@ -254,7 +257,7 @@ class Environment(object): finalize=None, autoescape=False, loader=None, - cache_size=50, + cache_size=400, auto_reload=True, bytecode_cache=None): # !!Important notice!!