|
|
|
@ -1106,27 +1106,29 @@ export default class View implements ViewType {
|
|
|
|
|
await ncMeta.metaDelete(null, null, columnTable, { |
|
|
|
|
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( |
|
|
|
|
tableScope, |
|
|
|
|
`${tableScope}:${viewId}`, |
|
|
|
|
CacheDelDirection.CHILD_TO_PARENT, |
|
|
|
|
); |
|
|
|
|
await ncMeta.metaDelete(null, null, table, { |
|
|
|
|
fk_view_id: viewId, |
|
|
|
|
}); |
|
|
|
|
await NocoCache.deepDel( |
|
|
|
|
columnTableScope, |
|
|
|
|
`${columnTableScope}:${viewId}`, |
|
|
|
|
CacheDelDirection.CHILD_TO_PARENT, |
|
|
|
|
); |
|
|
|
|
await ncMeta.metaDelete(null, null, MetaTable.VIEWS, viewId); |
|
|
|
|
await NocoCache.deepDel( |
|
|
|
|
CacheScope.VIEW, |
|
|
|
|
`${CacheScope.VIEW}:${viewId}`, |
|
|
|
|
CacheDelDirection.CHILD_TO_PARENT, |
|
|
|
|
); |
|
|
|
|
await NocoCache.del(`${CacheScope.VIEW}:${view.fk_model_id}:${view.title}`); |
|
|
|
|
await NocoCache.del(`${CacheScope.VIEW}:${view.fk_model_id}:${view.id}`); |
|
|
|
|
await NocoCache.del([ |
|
|
|
|
`${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
|
|
|
|
|
await View.clearSingleQueryCache(view.fk_model_id, [view]); |
|
|
|
|