Google App Engine кеширует шаблоны из коробки, чтобы ваше приложение реагировало.
Вот интересная часть модуля template.py , доступная в исходном коде:
def render(template_path, template_dict, debug=False):
"""Renders the template at the given path with the given dict of values."""
t = load(template_path, debug)
return t.render(Context(template_dict))
template_cache = {}
def load(path, debug=False):
abspath = os.path.abspath(path)
if not debug:
template = template_cache.get(abspath, None) # <---- CACHING!
else:
template = None
if not template:
directory, file_name = os.path.split(abspath)
...
Как видите, единственное, что нужно иметь в виду, это избегать установки debug = True
в Production.