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

关于cacheKey为函数时,如何精准清除某一个页面的缓存 #175

Open
Cheney-bot opened this issue Nov 22, 2024 · 0 comments
Open

Comments

@Cheney-bot
Copy link

Cheney-bot commented Nov 22, 2024

作者你好
我使用props.location.pathname函数动态赋值cacheKey,一般情况下,使用dropByCacheKey传入赋值的cacheKey值,能够清除页面缓存。
但是有一个场景,项目中存在:id的页面,然后我随便在一个页面进行刷新,此时项目重走初始化逻辑,CacheRoute中赋值的cacheKey只要存在:的动态路由的cacheKey都为此时我刷新页面的pathname,cacheKey不唯一,所以此时我清除不掉此页面缓存,这种场景如何处理

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

No branches or pull requests

1 participant