1) Best performance you will achieve, when you cache whole page content and after the page rendered you replace or push dynamic elements via AJAX. Be carefull, that this choice will not work on clients without JS.

2) Second way is not to cache whole page content, but cache only static blocks which have the same content. This will work always.

And how to cache the certain content in the above example? with File cache or Memcache?

There are multiple ways how to do that:

1) Best performance you will achieve, when you cache whole page content and after the page rendered you replace or push dynamic elements via AJAX. Be carefull, that this choice will not work on clients without JS.

2) Second way is not to cache whole page content, but cache only static blocks which have the same content. This will work always.