Closed Archmonger closed 6 months ago
We currently don't have any multiprocessing compatible way to cache component renders, similar to Django's cached_page decorator.
cached_page
Create a caching decorator. The API might look something like this....
def cache_component(timeout, *, cache=None): """The cache is keyed by the component's dotted path.""" ... return decorator @cache_component(60 * 15, cache=REACTPY_CACHE) @component def example(): ...
Closing this since it is not technologically possible to maintain interactivity while also catching renders.
Current Situation
We currently don't have any multiprocessing compatible way to cache component renders, similar to Django's
cached_page
decorator.Proposed Actions
Create a caching decorator. The API might look something like this....