By its very definition, the caching process is a collection of data, which duplicates original values, stored elsewhere or computed earlier, where the original data is expensive to fetch, and served later to the end user instead of the original data.
The only way to achieve what you need is to place the dynamic content (sidebar) inside an
iframe. This is the way to combine the data, computed earlier with the original data, because actually an
iframe is a window inside a window. So the cached page will contain this
iframe, which will point to the dynamic page, which generates the current Cart state.
This however will require modification of the sidebar and/or the theme you use.