Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What does LPUSHX/RPUSHX do differently?



Push if list exists. This are the operations that are at the base of the twitter Redis caching implementation.

This operations are useful every time you want to use Redis for caching timelines, as the idea is: if this user is already in cache (at least a single item exists) then push against the cache, otherwise not.


Ah, thanks for the explanation. I'm actually exploring Redis for storing timelines!

Twitter's Redis-backed timeline storage is here, if anyone is interested: https://github.com/twitter/haplocheirus




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: