def do_cache(parser, token):
    nodelist = parser.parse(('endcache',))
    parser.delete_first_token()
    tokens = token.contents.split()
    if len(tokens) < 3:
        raise TemplateSyntaxError(u"'%r' tag requires at least 2 arguments." % tokens[0])
    return CacheNode(nodelist, tokens[1], tokens[2], tokens[3:])
This will cache the contents of a template fragment for a given amount
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/_internal/django/templatetags/cache.py/do_cache