i have two different categories for woocommerce products, when i'm on category A page there should be products in mini cart section from category A only.

and when on category B there should only be category b products in mini cart.

i have mini-cart.php and other is mini-cart-b.php

when i click "add to cart" it out puts perfect data against category only products, but when i click on category B LINK mini cart shows category A products :( and this is the problem.
and if i click add to cart on category B page than it gets updated with products against this category.

what i want to understand is when page loads how data is populated in mini-cart which file is being used or data comes from session ?