Best way to load once using parametrized class

I’m relatively new to using Panel. So far getting up and running has been straight-forward. I’m using Panel’s parametrized class interface to create an app.

I want to adapt the defer data load example to work in this context.

The goal is to load some background data (small amount) and cache it when the app loads, so that the rest of the app can reference it from the cache.

The rest of the app uses calculations on this dataset based on user input. I’m using param@depends to make these calculations (and plots) dependent on the user choices. But right now I’m loading the original data repeatedly (the methods that do the calculations call a method that loads the data over, so the data load is repeated)!

Any pointers?

1 Like

Hi @RNKuhns

Could you provide a small, reproducible example the illustrates what you are doing or what your challenge is? That would make it easy to try to help.