Cache tweets forever [again]

Now that we no longer have "??? users" (i.e. in no case can a
twist "look bad"), caching forever can boost things up seriously
*and* it's cool to see how someone's avatar changes over time :)
This commit is contained in:
The Dod 2014-04-02 01:11:53 +07:00
parent 1b576eb4fa
commit 969842e924

View File

@ -41,7 +41,7 @@ class Twister:
"reply":self._format_reply(p['userpost'].get('reply',{})), "reply":self._format_reply(p['userpost'].get('reply',{})),
}) })
return result return result
@functioncache(60*60,ignore_instance=True) # can't cache forever, because maybe user was a skip_cache, in that case it's snafu for an hour :( @functioncache(ignore_instance=True) # Cache forever. One day we'll look at our old avatars and remember how stupid we used to be.
def get_twist(self,username,k): def get_twist(self,username,k):
p = self.twister.dhtget(username,'post{0}'.format(k),'s') p = self.twister.dhtget(username,'post{0}'.format(k),'s')
if p: if p: