|
|
@ -1106,27 +1106,29 @@ export default class View implements ViewType { |
|
|
|
await ncMeta.metaDelete(null, null, columnTable, { |
|
|
|
await ncMeta.metaDelete(null, null, columnTable, { |
|
|
|
fk_view_id: viewId, |
|
|
|
fk_view_id: viewId, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
await ncMeta.metaDelete(null, null, table, { |
|
|
|
|
|
|
|
fk_view_id: viewId, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
await ncMeta.metaDelete(null, null, MetaTable.VIEWS, viewId); |
|
|
|
await NocoCache.deepDel( |
|
|
|
await NocoCache.deepDel( |
|
|
|
tableScope, |
|
|
|
tableScope, |
|
|
|
`${tableScope}:${viewId}`, |
|
|
|
`${tableScope}:${viewId}`, |
|
|
|
CacheDelDirection.CHILD_TO_PARENT, |
|
|
|
CacheDelDirection.CHILD_TO_PARENT, |
|
|
|
); |
|
|
|
); |
|
|
|
await ncMeta.metaDelete(null, null, table, { |
|
|
|
|
|
|
|
fk_view_id: viewId, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
await NocoCache.deepDel( |
|
|
|
await NocoCache.deepDel( |
|
|
|
columnTableScope, |
|
|
|
columnTableScope, |
|
|
|
`${columnTableScope}:${viewId}`, |
|
|
|
`${columnTableScope}:${viewId}`, |
|
|
|
CacheDelDirection.CHILD_TO_PARENT, |
|
|
|
CacheDelDirection.CHILD_TO_PARENT, |
|
|
|
); |
|
|
|
); |
|
|
|
await ncMeta.metaDelete(null, null, MetaTable.VIEWS, viewId); |
|
|
|
|
|
|
|
await NocoCache.deepDel( |
|
|
|
await NocoCache.deepDel( |
|
|
|
CacheScope.VIEW, |
|
|
|
CacheScope.VIEW, |
|
|
|
`${CacheScope.VIEW}:${viewId}`, |
|
|
|
`${CacheScope.VIEW}:${viewId}`, |
|
|
|
CacheDelDirection.CHILD_TO_PARENT, |
|
|
|
CacheDelDirection.CHILD_TO_PARENT, |
|
|
|
); |
|
|
|
); |
|
|
|
await NocoCache.del(`${CacheScope.VIEW}:${view.fk_model_id}:${view.title}`); |
|
|
|
await NocoCache.del([ |
|
|
|
await NocoCache.del(`${CacheScope.VIEW}:${view.fk_model_id}:${view.id}`); |
|
|
|
`${CacheScope.VIEW_ALIAS}:${view.fk_model_id}:${view.title}`, |
|
|
|
|
|
|
|
`${CacheScope.VIEW_ALIAS}:${view.fk_model_id}:${view.id}`, |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
// on update, delete any optimised single query cache
|
|
|
|
// on update, delete any optimised single query cache
|
|
|
|
await View.clearSingleQueryCache(view.fk_model_id, [view]); |
|
|
|
await View.clearSingleQueryCache(view.fk_model_id, [view]); |
|
|
|