client cache in memory and in HTML5 indexedDB or localStorage