Hello!
I am following the example in the documentation for creating a Multi-Page App with one page per file. I am wondering how I should share a cache between pages.
Cache is created in app.py
cache = Cache(
app.server,
config={"CACHE_TYPE":"FileSystemCache"},
)
And for example in page1
@cache.memoize()
@callback(
Output('page-1-display-value', 'children'),
Input('page-1-dropdown', 'value'))
def display_value(value):
return f'You have selected {value}'
But to get the cache from app.py I would need to import it which causes a circular import.
How do I share the cache object to the other pages without introducing circular imports?