Browse Source

fix: delete project:<uuid> in cache for disable shared base

feat/0523-export-schema
Wing-Kam Wong 2 years ago committed by Raju Udava
parent
commit
61b5454733
  1. 5
      packages/nocodb/src/lib/models/Project.ts

5
packages/nocodb/src/lib/models/Project.ts

@ -237,6 +237,7 @@ export default class Project implements ProjectType {
let o = await NocoCache.get(key, CacheGetType.TYPE_OBJECT);
if (o) {
// update data
// new uuid is generated
if (o.uuid && updateObj.uuid && o.uuid !== updateObj.uuid) {
await NocoCache.del(`${CacheScope.PROJECT}:${o.uuid}`);
await NocoCache.set(
@ -244,6 +245,10 @@ export default class Project implements ProjectType {
projectId
);
}
// disable shared base
if (o.uuid && updateObj.uuid === null) {
await NocoCache.del(`${CacheScope.PROJECT}:${o.uuid}`);
}
if (o.title && updateObj.title && o.title !== updateObj.title) {
await NocoCache.del(`${CacheScope.PROJECT}:${o.title}`);
await NocoCache.set(

Loading…
Cancel
Save