Background/Memoized callback questions

Hi,

I would have some basic question about background callbacks and Flask caching.

What would be a good recipe to have a flask memoized callback (i.e. shared amongst sessions) that is also running as background process? Would I need to split it out into first running the background callback and then put the result of that into a memoized function?

Reason i’m asking is that I’m getting an error if I’m trying to run something like below - Dash doesn’t seem to allow a callback to be both a background callback and a memoized function.

Background callbacks by themselves seem to be memoized but they are not shared amongst sessions.

@app.callback(
    output=[
        Output('store_rowdata', 'data')
    ],
    inputs=Input("store_interval", "data"),
    background=True,
)
@cache.memoize(timeout=60*500)
def loadData(val):

Any insights would be appreciated.

Regards