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

FIO-9006: Fixed cached grid responses #1104

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export class FormGridBodyComponent extends GridBodyComponent implements OnDestro

load(formio: FormioPromiseService, query?: any) {
query = query || {};
return formio.loadForms({ params: query })
return formio.loadForms(
Copy link
Contributor

@brendanbond brendanbond Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But isn't the cache generally speaking a good thing except in this edge case? If I understand this correctly, this would disable browser caching for all requests of this kind. Is there a way to limit this change to only certain cases involving pagination?

I remember something about an If-Range header, but it's been awhile...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me that the etag headers are doing the right thing. the value is changing after you submit a new form, so I don't think it's directly related to the caching policy.

Also I was testing this in remote-next and couldn't reproduce. I was also seeing the no-cache value set. Let's make sure something didn't get merged or deployed by accident.

{ params: query },
{ headers: { 'cache-control': 'no-cache' } },
)
.then((forms: any) => this.setRows(query, forms))
.then(() => this.attachTooltips());
}
Expand Down
Loading