Show and Tell - Server Side Caching

Hi @Emil,

In the documentation of ServerSideOutputTransform, you mentioned that

it is recommended to perform scheduled cleanups outside business hours

How can cleanups be scheduled? Will restarting the app cleanup the cache?

Thanks for your help!

The cleanup can be scheduled using you method of choice. It could be a cron job, and scheduled background task in Python, a task scheduled by Windows scheduler. The best choice depends on you infrastructure setup.

Sorry, can I clarify what does a cleanup entail? Deleting the files cached in the file system? How would something like that work when deployed to something like Heroku? I apologize for these questions as I’m pretty new to the idea of caching. Thanks!

If you are using a file system store, then yes it would be deleting files. On Heroku, the file system is ephemeral, so I am not sure if manual cleaning is needed at all.

Hello everyone, i’m starting in dash and i fin usefull this dcc store concept, but i’m not pretty sure how to use in my code… now i set this compenent in a div into the layout and the first callback (the tradicional callback) set and save the data here so like 10 callbacks (taditional callbacks) take the data and process this information in order to make graphs etc… but reading this article i guess that here i can find a better way in order to make faster the app execution… @Emil can you share a code, like at the beggining, explaining the method? i couldn’t find it in your git hub repo.

Thanks in advance

Yes, you can find documentation here,

1 Like

I am getting error “AttributeError: ‘Output’ object has no attribute ‘backend’”, i have used following syntax.What could be the reason

@callback(
    ServersideOutput("store-data", "data"), 
    ServersideOutput("store-data2", "data"),
    ServersideOutput("store-data3", "data", arg_check=False, session_check=False),
    Output("data_refresh", "children"),
    Output("container","children"),
    Output("client-id-store","data"),
    Input("refresh_button","n_clicks"),
    State("url","search"),
    State("client-id-store","data"),
    State("store-data", "data"),
    State("store-data2", "data"),
    State("store-data3", "data")
    , memoize=True)