-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Description
Version
2.5.13
Reproduction link
https://runkit.com/martinlg/issue-vue-renderer-cache
Steps to reproduce
Run the Runkit code. If you prefer a git repository I can provide you one.
What is expected?
The value passed to the set
function should be a string.
What is actually happening?
The value passed to the set
function is an object, with 2 properties:
- html: a
string
containing the rendered component - components: a
Set
containing nothing or function, depending on context (sub-components I think)
This issue breaks any external cache possibility (Redis in my case).
The only possible cache is in the process memory, like the LRUCache, but it seems impossible to scale processes and share a common cache.
Moreover, the documentation explain clearly that the cached value should be a string, and even provides a small Redis example implementation, that could just not work.
I think that the documentation describe the expected behavior, so I don't want to "fix" the documentation, I think we should fix the behavior.
I will try to help but I may need some explanations on some parts of the RenderContext, can I ask my questions on this thread ?