mirror of
https://github.com/twisterarmy/swizzler.git
synced 2025-03-12 05:21:26 +00:00
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:
parent
1b576eb4fa
commit
969842e924
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user