Caching for logged in user and Ajax update

There are plugins that can help you with this, but they aren’t foolproof. My suggestion is W3 Total Cache, you should be able to exclude necessary files from the cache from there. Your best solution, however is to do caching on the serverside level as you will see better performance that way.