Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion shell/plugins/dashboard-store/resource-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,15 @@ export default class Resource {

// Steve sometimes returns Table responses instead of the resource you just saved.. ignore
if ( res && res.kind !== 'Table') {
await this.$dispatch('load', { data: res, existing: (forNew ? this : undefined ) });
// Will loading this resource invalidate the resources in the cache that represent a page (resource is not from page)
// By default we set this to no, it won't pollute the cache. Most likely either
// 1. The resource came from a list already (loaded resource is already in the page that is in the cache)
// 2. UI is not on a page with a list (cache doesn't represent a list)
const invalidatePageCache = opt.invalidatePageCache || false;

await this.$dispatch('load', {
data: res, existing: (forNew ? this : undefined ), invalidatePageCache
});
}
} catch (e) {
if ( this.type && this.id && e?._status === 409) {
Expand Down
Loading