thnaks for information. I contacted wprocket team for explication.
Share the answer :
The two most common reasons why this might be happening are as follows:
1) WP Rocket caches cart fragments as explained here: Optimize WooCommerce Get Refreshed Fragments
So if that’s involved in the problem, installing the helper plugin (linked in that same article) should resolve it.
2) If the helper plugin makes no difference in the issue, then the next thing to consider is that the Menu Cart may not be fully “AJAX-ified”.
Using AJAX for cart widgets is required in order for them to be compatible with our page caching — you can’t rely on PHP to update it, because WP Rocket eliminates all PHP/MySQL processes from a page and creates static HTML output instead (as do most other caching plugins).
To fix it, there are two options:
A) “AJAX-ify” your cart widget.
The specifics will vary depending on your theme/plugin, but the concept is described in these posts:
https://wp-rocket.me/blog/using-woocommerce-dynamic-cart-wp-rocket/
https://docs.woothemes.com/document/show-cart-contents-total/
This approach requires custom development (which is outside of our Support Policy), so if you need help with that, you could try to find a developer at https://codeable.io.
— OR —
B) Prevent caching when the cart is in use.
If your e-commerce plugin sets a cookie when items are added to the cart you can use this to prevent caching.
Go to the Advanced tab in WP Rocket, find the box labelled “Don’t cache pages that use the following cookies”, and enter the cookie value.