Ask HN: How to design API for item with likes and how to cache it?

1 points by tyzerdak ↗ HN
For example i have post:

I need to get attributes (id, title, body, likes) for not authenticated user. For authenticated user i also need to get is_liked (id, title, body, likes, is_liked). What I don't know is how to cache it and should i make 2 requests or single (and on php merge cached post with is_liked)?

What's is standard practice for things like this?

0 comments

[ 2.7 ms ] story [ 7.3 ms ] thread

No comments yet.