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

routes.js添加缓存配置cache: true但是keep-alive未生效 #63

Open
qcl1024 opened this issue Dec 13, 2023 · 0 comments
Open

routes.js添加缓存配置cache: true但是keep-alive未生效 #63

qcl1024 opened this issue Dec 13, 2023 · 0 comments

Comments

@qcl1024
Copy link

qcl1024 commented Dec 13, 2023

record/index.vue中实现页面缓存用的 Utils.getLocalStorage,能够生效;但是在 client\src\router\routes.js 中配置 /mock/index 页面增加缓存配置 cache: true 不生效?打印日志发现 第二次进入页面的时候created钩子被再次调用,没找到keep-alive未生效的原因,可否看一下如何处理?
{
path: '/mock/index',
component: () => import(/* webpackChunkName: 'mock' */ 'views/mock/index'),
name: 'mock',
meta: {
title: '回放Mock',
cache: true
}
},

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