'How does facebook calculate mutual friends? [closed]

In your opinion, how does facebook calculate mutual friends?

Has it cached all mutual friends for each user? Or does it let MySQL calculate through a query each time it displays them? Or does it make a query to the database and then calculate from a list? Or is there another way?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source