feat(keepAlive): expose pruneCacheEntry and add key match support on exclude/include changed in pruneCache.#5105
feat(keepAlive): expose pruneCacheEntry and add key match support on exclude/include changed in pruneCache.#5105Riant wants to merge 2 commits intovuejs:mainfrom
Conversation
…ter 判断,增加对基于 component key 的 match 判断支持,以在 include, exclude 的 watch 回调中提供对应支持
|
Note: it's very similar to #4339 |
Yes, there are so many developers need and talk about this feature, and it is strange there is no progress so far. and like what you said, it is smallest, this pr or even a half of this pr is enough.
Did you mean the key match support in this pr? I just want to provide another way, In my opinion,
I am not good at that, and I will try later. |
Current 3.2 In the 26 version, KeepAlive's exclude still does not support key. When it comes to the effective process of exclude, he will still match the routing name, or is it using other ways to make key control the cache of routing? |
|
Yep, the current version of vue can't. I mean that this pr seems supported, but I haven't really tried😁 |
I'm sorry to misunderstand your idea |
|
Never mind, bro |
|
Hoping more progress on this PR :D ~~~ |
|
When to merge this? |
|
只能自己手动来实现缓存了 |
So, we can
this.$refs.keepAlive.pruneCacheEntry('COMPONENT_NAME/KEY');