mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-04 21:17:55 +08:00
feat(ssr): allow opting-out of caching by returning false in serverCacheKey
close #8790
This commit is contained in:
parent
d7a533d6f8
commit
ab24285458
@ -114,7 +114,12 @@ function renderComponent (node, isRoot, context) {
|
||||
const registerComponent = registerComponentForCache(Ctor.options, write)
|
||||
|
||||
if (isDef(getKey) && isDef(cache) && isDef(name)) {
|
||||
const key = name + '::' + getKey(node.componentOptions.propsData)
|
||||
const rawKey = getKey(node.componentOptions.propsData)
|
||||
if (rawKey === false) {
|
||||
renderComponentInner(node, isRoot, context)
|
||||
return
|
||||
}
|
||||
const key = name + '::' + rawKey
|
||||
const { has, get } = context
|
||||
if (isDef(has)) {
|
||||
has(key, hit => {
|
||||
@ -188,7 +193,7 @@ function renderComponentInner (node, isRoot, context) {
|
||||
context.activeInstance
|
||||
)
|
||||
normalizeRender(child)
|
||||
|
||||
|
||||
const resolve = () => {
|
||||
const childNode = child._render()
|
||||
childNode.parent = node
|
||||
|
Loading…
Reference in New Issue
Block a user