@register.tag
def showifcached(parser, token):
 tokens = token.contents.split()
 if (len(tokens) != 2):
  raise TemplateSyntaxError((u"'%r' tag requires 1 argument." % tokens[0]))
 return ShowIfCachedNode(tokens[1])

@ register . tag def showifcached ( parser , token ) : tokens = token . contents . split ( ) if ( len ( tokens ) != 2 ) : raise TemplateSyntaxError ( ( u"'%r' tag requires 1 argument." % tokens [ 0 ] ) ) return ShowIfCachedNode ( tokens [ 1 ] )
show content if it exists in the cache .