def get(self, example_id): example = Example.get_by_id(int(example_id)) if example is None: self.error(404) else: self.respond(example.value, content_type='text/plain', cache_life=60 * 60)
def get(self, example_id): example = Example.get_by_id( int(example_id) ) if example is None: self.error(404) else: self.respond(example.value, content_type='text/plain', cache_life=60*60)
def get(self, example_id): example = Example.get_by_id( int(example_id) ) if example is None: self.error(404) else: self.respond(example, cache_life=60*60) # cache for 1 hour
def get(self, example_id): example = Example.get_by_id(int(example_id)) if example is None: self.error(404) else: self.respond(example, cache_life=60 * 60) # cache for 1 hour