When is cached data restored in memory plotly?

@app.callback([Output('data_a','data'),Output('data_funnel_a','data'),Output('table_data_a','data')],

[Input('server_data','data'),Input('server_data_base','data'),Input('input_origin_a', 'value'), Input('date_filter_a', 'start_date'), Input('date_filter_a', 'end_date'),Input('status_a','value'),Input('bot','value')])

I have the following two cache side stored datas that are used as input in my callback. The ones being server_data and server_data_base

    if bot == 'residential':
        bot_data = server_data
    elif bot == 'base':
        bot_data = server_data_base

The thing is I also have this if statement, that tells me which data to grab from cache depending on the input value given by the user in a simple radio button. My question is is there a way to avoid storing the unwanted cache in memory in the callback? For example, if a user selects residential only bring up the server_data cache.

Hello @Sirmadeira,

I believe so, this would need to be a chained callback, basically the selection populates a new selected_data store in memory via a clientside callback.

This selected_data being altered is then the trigger and information for the second callback to carry on with whatever you want to do.