Home / Function/ registerComponentForCache() — vue Function Reference

registerComponentForCache() — vue Function Reference

Architecture documentation for the registerComponentForCache() function in render.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  916e77c4_6ed2_baeb_dd37_5bbdbfb0ce8c["registerComponentForCache()"]
  439dcf36_0570_3186_196e_91c09d6d3ea6["render.ts"]
  916e77c4_6ed2_baeb_dd37_5bbdbfb0ce8c -->|defined in| 439dcf36_0570_3186_196e_91c09d6d3ea6
  76fb6501_9238_f973_a09b_d816dccd3853["renderComponent()"]
  76fb6501_9238_f973_a09b_d816dccd3853 -->|calls| 916e77c4_6ed2_baeb_dd37_5bbdbfb0ce8c
  d9e88fbe_8aa3_df58_ea93_81e3ec0c817b["renderElement()"]
  d9e88fbe_8aa3_df58_ea93_81e3ec0c817b -->|calls| 916e77c4_6ed2_baeb_dd37_5bbdbfb0ce8c
  style 916e77c4_6ed2_baeb_dd37_5bbdbfb0ce8c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/src/render.ts lines 101–109

function registerComponentForCache(options, write) {
  // exposed by vue-loader, need to call this if cache hit because
  // component lifecycle hooks will not be called.
  const register = options._ssrRegister
  if (write.caching && isDef(register)) {
    write.componentBuffer[write.componentBuffer.length - 1].add(register)
  }
  return register
}

Subdomains

Frequently Asked Questions

What does registerComponentForCache() do?
registerComponentForCache() is a function in the vue codebase, defined in packages/server-renderer/src/render.ts.
Where is registerComponentForCache() defined?
registerComponentForCache() is defined in packages/server-renderer/src/render.ts at line 101.
What calls registerComponentForCache()?
registerComponentForCache() is called by 2 function(s): renderComponent, renderElement.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free