Being able to decide at runtime if a component should be cached on the server.
For example, if I have a re-usable ImageViewer component that I only want cached in certain use cases.
import { get } from 'lodash-es'; export default { name: 'ImageViewer', serverCacheKey: (props) => get(props, 'images.0.id'), props: { images: { type: Array, required: true } } };
It would be preferred to be able to return undefined from the serverCacheKey function and know that the component won't be cached. Currently, it would be cached by its name and would collide with any other uses of the component that also returned undefined.
What does the proposed API look like?The same API for the existing serverCacheKey that takes the props object, but allow for returning undefined to indicate, to skip looking for the component in the server renderer cache (even if the component has a name).
sirlancelot, seriouslysean, j12345j6 and dgautsch
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4