From 969842e9248e0d1f0e3ebd7a1e5711447c78e28e Mon Sep 17 00:00:00 2001 From: The Dod Date: Wed, 2 Apr 2014 01:11:53 +0700 Subject: [PATCH] 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 :) --- twister.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twister.py b/twister.py index a78e6af..8add874 100644 --- a/twister.py +++ b/twister.py @@ -41,7 +41,7 @@ class Twister: "reply":self._format_reply(p['userpost'].get('reply',{})), }) 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): p = self.twister.dhtget(username,'post{0}'.format(k),'s') if p: