Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(KeepAlive): support matchBy + allow custom caching strategy #3414

Closed
wants to merge 8 commits into from
Closed

feat(KeepAlive): support matchBy + allow custom caching strategy #3414

wants to merge 8 commits into from

Conversation

HcySunYang
Copy link
Member

@HcySunYang HcySunYang commented Mar 12, 2021

Close: #2084

This PR allows KeepAlive to use the vnode.key as the matching name, but the component's name still has a higher priority, which can avoid introducing breaking changes

Writing RFC.....

Edit: RFC vuejs/rfcs#284

@posva
Copy link
Member

posva commented Mar 12, 2021

I think this should go through an RFC first to explore the different possible APIs, e.g. we could also only match by key if another prop is passed by-key, or match-by, etc

@HcySunYang
Copy link
Member Author

HcySunYang commented Mar 12, 2021

Agree, there is still an issue requesting the management of the cache, also this #1518

@HcySunYang HcySunYang changed the title feat(KeepAlive): support using key as matching name WIP(KeepAlive): support matchBy + allow custom caching strategy Mar 15, 2021
@HcySunYang HcySunYang changed the title WIP(KeepAlive): support matchBy + allow custom caching strategy feat(KeepAlive): support matchBy + allow custom caching strategy Mar 17, 2021
danyadev added a commit to danyadev/vk-desktop that referenced this pull request Mar 24, 2021
@snltty
Copy link

snltty commented Jun 27, 2021

这个啥时候能用上呢

@hezhongfeng
Copy link

I don’t like Vue’s KeepAlive cache policy , So I want to create a component like KeepAlive.
But When I use my Component with transition,there is a error Uncaught TypeError: Cannot read property '_' of null.
This error is create by packages/runtime-core/src/componentSlots.ts initSlots.
Looking forward to this PR.

@yuanjinyong
Copy link

这个啥时候能用上呢

同问

@hezhongfeng
Copy link

Is there any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow including/excluding by key in keep-alive
5 participants