You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'am seeing wrong meta data when using LRU caching and SSR.
Setting a serverCacheKey in a component's options, will cache the component server side.
Case:
Let's say we have a component A and B with both a serverCacheKey and a different vue meta title.
The following:
<template>
<A>
<B></B>
</A>
</template>
Will result in:
The first load the rendered meta title will be Title B.
A second reload (cache hit) will render title A.
I know this is related to SSR Caching and not directly to Vue Meta.
Still, it would be helpful as I encountered this use case, as such others might aswel.
An example in the docs would do wonders 👍
Request:
SSR + Caching (LRU) components and keep rendering the correct metadata even on a cache hit.
The text was updated successfully, but these errors were encountered:
I am not sure what we could do to fix this as afaik Vue doesnt emit any events when a component is re-used from cache? The docs also mention you shouldnt use component caching when child components produce side effects (which is what vue-meta does): https://ssr.vuejs.org/guide/caching.html#when-to-use-component-caching
But if anyone has an idea for a workaround we are open to suggestions ofc!
Btw, probably not what you need but client side the correct meta title will be displayed once the fix for #283 is released
Thanks for your contribution to vue-meta! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of vue-meta
Comment the steps to reproduce it
Issues that are labeled as pending will not be automatically marked as stale.
i think:when vue instance lifecycle hooks were called,vue-meta power function will be called at the same time.
so if your nested component use cache,at the first time,you can get the correct metainfo.
but metainfo get [undefined] at the second time,because the cached component instance lifecycle hooks did not be called.
so many years have passed, and surprisingly few people have mentioned this problem.
I'am seeing wrong meta data when using LRU caching and SSR.
Setting a serverCacheKey in a component's options, will cache the component server side.
Case:
Let's say we have a component A and B with both a serverCacheKey and a different vue meta title.
The following:
Will result in:
The first load the rendered meta title will be Title B.
A second reload (cache hit) will render title A.
I know this is related to SSR Caching and not directly to Vue Meta.
Still, it would be helpful as I encountered this use case, as such others might aswel.
An example in the docs would do wonders 👍
Request:
SSR + Caching (LRU) components and keep rendering the correct metadata even on a cache hit.
The text was updated successfully, but these errors were encountered: