I am asking how to cache all the options of the dropdown boxes on the client side, baring in mind that the options of boxes depend on their parents.
ie. box 3 (color) options depend on box 2 (size).
e.g. Product "ABC" in size "25mm" has color options "black" and "pink", but Product "ABC" in size "50mm" has color option "black" only.
In this case, I guess the data has to be cached something like this:
there are total 6 dropdowns so in reality it will be more like this: