Merge 5139216ee89fb8bae2348f6ece6ce08a3717b706 into c0aec854afe11bfd607580dbc700884a0e7dcc3f

This commit is contained in:
white-letter 2022-10-07 12:25:37 +08:00 committed by GitHub
commit e480a97920
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,7 +301,8 @@ export default {
routes.forEach(item => { routes.forEach(item => {
const cacheAble = item.meta?.page?.cacheAble ?? pCache ?? true const cacheAble = item.meta?.page?.cacheAble ?? pCache ?? true
if (!cacheAble) { if (!cacheAble) {
this.excludeKeys.push(new RegExp(`${item.path}\\d+$`)) const path = item.path.replace(/:.+?\//g, '.+?/').replace(/:.+?$/g, '.+$')
this.excludeKeys.push(new RegExp(`${path}`))
} }
if (item.children) { if (item.children) {
this.loadCacheConfig(item.children, cacheAble) this.loadCacheConfig(item.children, cacheAble)