Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Multi-source table list cache issue #7772

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 10 additions & 7 deletions packages/nocodb/src/models/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down