Multiple tabs in one file

I am trying to have a multiple tab set up with dash in the same file . Basically so that I dont re-run some calculations.
What happens is that when I run my dash script at first It works perfectly. Once I go to the second tab and I try to go back to the first one, the data is not loading.
The tab picker call back output is an input of the second layout but I cant manage to add it as an input for the first layout.
I am thinking of a solution but I am not very familiar with dash:
1- Is there a way a callback can be skipped if it doesnt find an input or output ID ? Hence when the layout 2 is not activated only the callbacks related to the layout 1 is activated?
2- Can I explicitely ask for a callback to be fired when another callback A or B is fired depending on a certain condition?

I am basically having/
layout1 = …
layout2= …

@app.callback… to choose the tab
@app.callback… related to tab1
@app.callback… related to tab2
the inputs and outputs of each tab specific callback only exist in either tab1 or tab2

Basically I am not separating the callbacks in different files to use the same object intiated in tab1 callback…

Can someone help me with this one please?