def retrieve(self, key): item = memcache.get(key) if item is not None: return item else: item = self.convertToRssItems( MatchedFile.all().order("-date").fetch(25) ) if item is not None and not memcache.add(key, item): logging.error("Memcache set failed on %s" % key) return item
def retrieve(self, key): item = memcache.get(key) if item is not None: return item else: item = self.convertToRssItems( MatchedFile.all().order("-date").fetch(25)) if item is not None and not memcache.add(key, item): logging.error("Memcache set failed on %s" % key) return item
def data(self): return MatchedFile.all().order("-date").fetch(1000)