I'm learning how to structure and query data of a social media application where all the posts are stored in PostgreSQL. Every post has some meta data that can be huge but only a portion of it will be showed in the user feed, for example imageURL, title. Every user has friends that are linked in PostgreSQL. Im trying to see what is the best way to implement a user feed with Redis.
if redis is storing only postID's in the user feed, should it also store post information as a different hash table and after getting the user feed get all the post information from the hash table
or after getting the postID's from the user feed, query Postgres for the posts before returning to user.
What is more scalable, economical and efficient solution or is there a completely different way to approach this?