-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opt-out of serverCacheKey #8790
Comments
I think an explicit |
Sounds good. Just looking for a way to conditionally prevent caching. |
Closed via ab24285 |
f2009
pushed a commit
to f2009/vue
that referenced
this issue
Jan 25, 2019
f2009
pushed a commit
to f2009/vue
that referenced
this issue
Jan 25, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem does this feature solve?
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.
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).
The text was updated successfully, but these errors were encountered: