The template:
#cache timer='.5m', id='cache1' This is a cached region. $voom #end cache
The output:
This is a cached region. Voom!
The generated code is the same as the previous example except the first if-block:
RECACHE = True if not self._cacheData.has_key('13925129'): self._cacheIndex['cache1'] = '13925129' self.__cache13925129__refreshTime = currentTime() + 30.0 elif currentTime() > self.__cache13925129__refreshTime: self.__cache13925129__refreshTime = currentTime() + 30.0 else: RECACHE = False