mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 07:06:41 +00:00
Merge pull request #12945 from nocodb/nc-fix/read-by-pr-cache-issue
fix: Cache clear
This commit is contained in:
@@ -2028,15 +2028,25 @@ export default class View implements ViewType {
|
|||||||
deleteKeys.push(
|
deleteKeys.push(
|
||||||
`${CacheScope.SINGLE_QUERY}:${modelId}:${view.id}:queries`,
|
`${CacheScope.SINGLE_QUERY}:${modelId}:${view.id}:queries`,
|
||||||
`${CacheScope.SINGLE_QUERY}:${modelId}:${view.id}:count`,
|
`${CacheScope.SINGLE_QUERY}:${modelId}:${view.id}:count`,
|
||||||
`${CacheScope.SINGLE_QUERY}:${modelId}:${view.id}:read`,
|
|
||||||
);
|
);
|
||||||
|
// Add all 8 combinations of bitwise flags (0-7)
|
||||||
|
for (let flags = 0; flags < 8; flags++) {
|
||||||
|
deleteKeys.push(
|
||||||
|
`${CacheScope.SINGLE_QUERY}:${modelId}:${view.id}:read:${flags}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteKeys.push(
|
deleteKeys.push(
|
||||||
`${CacheScope.SINGLE_QUERY}:${modelId}:default:queries`,
|
`${CacheScope.SINGLE_QUERY}:${modelId}:default:queries`,
|
||||||
`${CacheScope.SINGLE_QUERY}:${modelId}:default:count`,
|
`${CacheScope.SINGLE_QUERY}:${modelId}:default:count`,
|
||||||
`${CacheScope.SINGLE_QUERY}:${modelId}:default:read`,
|
|
||||||
);
|
);
|
||||||
|
// Add all 8 combinations of bitwise flags (0-7)
|
||||||
|
for (let flags = 0; flags < 8; flags++) {
|
||||||
|
deleteKeys.push(
|
||||||
|
`${CacheScope.SINGLE_QUERY}:${modelId}:default:read:${flags}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
await NocoCache.del(context, deleteKeys);
|
await NocoCache.del(context, deleteKeys);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user