This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import google.appengine.api.memcache | |
DEFAULT_CACHE_TTL = 60 * 60 * 24 | |
def cache(function, ttl=DEFAULT_CACHE_TTL): | |
'''Cache `function` and its arguments for `ttl` seconds in GAE's | |
Memcache. | |
Usable as a decorator. | |
''' |
NewerOlder