Browse Source

Merge pull request #7772 from nocodb/fix/7771-table-list-cache-bug

fix: Multi-source table list cache issue
pull/7773/head
Pranav C 9 months ago committed by GitHub
parent
commit
b376052978
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 17
      packages/nocodb/src/models/Model.ts

17
packages/nocodb/src/models/Model.ts

@ -230,13 +230,16 @@ export default class Model implements TableType {
model.meta = parseMetaProp(model);
}
await NocoCache.setList(
CacheScope.MODEL,
[base_id, source_id],
modelList,
);
await NocoCache.setList(CacheScope.MODEL, [base_id], modelList);
// set cache based on source_id presence
if (source_id) {
await NocoCache.setList(
CacheScope.MODEL,
[base_id, source_id],
modelList,
);
} else {
await NocoCache.setList(CacheScope.MODEL, [base_id], modelList);
}
}
modelList.sort(
(a, b) =>

Loading…
Cancel
Save