What would be a good strategy to implement functionality similar to facebook 'likes'?
One relation table that does a many-to-many mapping between user and item should do the trick.
I have a website where people post comments, pictures, and other content. I want to add a feature that users can like/unlike these items.
I use a database to store all the content.
There are a few approaches I am looking at:
Method 1:

Add a 'like_count' column to the table, and increment it whenever someone likes an item
Add a 'user_likes' table to keep a track that everything the user has liked.

Pros: Simple to implement, minimal queries required.
Cons: The item needs to be refreshed with each change in like count. I have a whole list of items cached, which will break.
Method 2:

Create a new table 'like_summary' and store the total likes of each item in that table
Add a 'user_likes' table to keep a track that everything the user has liked.
Cache the like_summary data in memcache, and only flush it if the value changes

Pros: Less load on the main items table, it can be cached without worrying.
Cons: Too many hits on memcache (a page shows 20 items, which needs to be loaded from memcache), might be slow
Any suggestions?