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

bug: do not cache mutations to object cache results #234

Merged
merged 15 commits into from Jul 26, 2023

Conversation

markkelnar
Copy link
Contributor

When smart cache object cache is enabled to store results of queries, do not get/store mutation requests.

Fixes #196

src/Cache/Results.php Outdated Show resolved Hide resolved
src/Cache/Results.php Outdated Show resolved Hide resolved
src/Cache/Results.php Outdated Show resolved Hide resolved
markkelnar and others added 2 commits July 24, 2023 08:16
Co-authored-by: Jason Bahl <jasonbahl@mac.com>
Co-authored-by: Jason Bahl <jasonbahl@mac.com>
@jasonbahl jasonbahl changed the title bug:Do not cache mutations to object cache results bug: do not cache mutations to object cache results Jul 24, 2023
Copy link
Collaborator

@jasonbahl jasonbahl left a comment

Choose a reason for hiding this comment

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

@markkelnar per your question in Slack, if the test here seems valid and beneficial, let's pull it in. If it's a flaky test or otherwise unhelpful, we can close that PR and move on.

Copy link
Collaborator

@jasonbahl jasonbahl left a comment

Choose a reason for hiding this comment

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

@markkelnar I merged the PR that fixes the tests and then merged main back into this PR and tests are still failing.

I investigated a bit and thought I had found a bug where the filter was returning nothing instead of the default filtered value.

However this didn't fix the issue.

The BatchQueryTest is still failing.

@jasonbahl
Copy link
Collaborator

@markkelnar I pushed up some more changes and got tests passing.

@jasonbahl jasonbahl self-requested a review July 26, 2023 14:43
@markkelnar markkelnar merged commit df2eb13 into wp-graphql:main Jul 26, 2023
7 checks passed
@markkelnar markkelnar deleted the bug-mutation-should-not-cache branch July 26, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mutations should not be cached
2 participants