How to fetch from DB once if page was opened?

I wanna make some dashboard.
If a user connected my server, client can see some graphs.
This graphs is made of dataframe.
User can click some button to redraw graphs.
If data is fetched from DB every button clicks, It is slow.
I don’t know best way for fetching DB one time.
I just use global variables.

So I created code like below.

import dash
import dash_bootstrap_components as dbc
from app import serve_layout

app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRA],
meta_tags=[{'name': 'viewport', 'content': 'width=device-width, initial-scale=1.0'}])
app.layout = serve_layout

if __name__ == "__main__":

import datetime
import pandas as pd
import dash_bootstrap_components as dbc
from dash import html
from dash import Input, Ouput, callback

def serve_lauyout():
  global df
  df = pd.read_csv("some.csv") # this is example. It can be replaced fetch from DB
  layout = html.Div(
        dbc.Button('Press', id='press', n_clicks=0)
  return layout

  Output('page', 'children'),
  Input('press', 'n_clicks')
def button_pressed(btn):
  global df
  return html.P(f"{df['COLUMN'].iloc[0]}, {}")



This code works fine. But if other user change df variable, my view is also changed.
I searched some documents and finds dcc.Store. But It is only used some events. It seems that it cannnot save data itself.
Help me please.