def get(self):
     msgid=self.request.get('msg')
     msg=None
     if msgid:
         msg=memcache.get(msgid)
     newrsslist=getNewRssList()
     if newrsslist==None:
         newrsslist=NewRSSList(key_name='newrsslist')
         newrsslist.put()
         memcache.set('newrsslist',newrsslist,360000)
     groupids=newrsslist.groupids
     groupids.reverse()
     if groupids:
         grouplist=Group.get_by_id(groupids)
     else:
         grouplist=[]
     self.render('templates/newrss.html',{'list':grouplist,'msg':msg})
Example #2
0
def getNewRssList():
    newrsslist = memcache.get("newrsslist")
    if not newrsslist:
        newrsslist = NewRSSList.get_by_key_name("newrsslist")
        memcache.set("newrsslist", newrsslist, 360000)
    return newrsslist