Skip to main content

Caching results

The biggest pitfall here is returning data that's specific to the requesting user. For example, if your SQL query checks a list of users the requesting user has blocked, you can't cache that query for anyone except the requesting user, as it will only be correct for their block list.