Block content cached between browsers

I am finalising the deployment of my first Cs Cart shop (MVE 2.1.4). I am finding at the moment that the content of the breadcrumbs and shopping cart block are appearing between different browsers. It appears to be bringing the content from the cache. So if I go to a category in one browser and then refresh the page in another browser the breadcrumbs are displayed from the other browser. If I update the config[‘tweaks’] to turn off the block caching the problem goes away. However I believe that the block cache introduced significant performace improvements. Is there something I have missed as to why the cart block and breadcrumbs are displaying cached content?

[quote name=‘martinm’]I am finalising the deployment of my first Cs Cart shop (MVE 2.1.4). I am finding at the moment that the content of the breadcrumbs and shopping cart block are appearing between different browsers. It appears to be bringing the content from the cache. So if I go to a category in one browser and then refresh the page in another browser the breadcrumbs are displayed from the other browser. If I update the config[‘tweaks’] to turn off the block caching the problem goes away. However I believe that the block cache introduced significant performace improvements. Is there something I have missed as to why the cart block and breadcrumbs are displaying cached content?[/QUOTE]



Hello martinm,



The problem requires the investigation on your server. Please contact us via Customer Help Desk and provide us with a temporary access to your server.





Mikhail Ponomarev

CS-Cart Support team

Thanks will do. I am getting the behaviour on both my development and live servers. I am sure your support will be able to help me resolve it.

[quote name='martinm' timestamp='1305051618' post='111980']

Thanks will do. I am getting the behaviour on both my development and live servers. I am sure your support will be able to help me resolve it.

[/quote]



I thought I would update on how I resolved the problem. After tinkering with the template I discovered that the views/checkout/components/cart_status.tpl was showing the correct details, but blocks/cart.tpl which I had put into a sidebox using the admin block layout was not. cart.tpl was bringing through cached content which mean different users where seeing the same cart content and not their own. To resolve this I added an entry for 'blocks/cart.tpl' into the 'STATIC_TEMPLATE_BLOCK' array in block_cache_properties.



The issue with the breadcrumbs.tpl being cached was a little more interesting. I noticed that breadcrumbs.tpl in one position on the page was giving cached content, but in a different position was giving the correct content. I had placed breadcrumbs.tpl inside a custom wrapper that I had created for the header section. When I removed breadcrumbs.tpl from inside my wrapper and called it from inside top.tpl it worked fine. I adjusted my layout and the problem was solved. I then re-enabled block caching in config.local.php and everything is working 100%.



In both cases it appears that having the content inside a block using a wrapper changed the way the caching was handled.

Good detailed information. Thanks.