Queries that send the same request can share parsed results
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
Research direction
Read the options and tradeoffs in issue #874, then trace how the parsed-results cache keys requests and how cache_get and cache_save are used. Check how the fix preserves duplicate suppression for failed and PUT, PATCH, or DELETE requests, along with subclass overrides and existing cache keys. Done means queries with the same request but different response processing no longer share parsed results.
Written by the indexing model from the issue text.
Description
Description
The in-memory cache for parsed results is keyed only by the request details. If two queries send the same request but process the response differently in one PHP request, the second gets the first one's result.
The same can happen within one query when an input changes the result but not the request.
Impact
Narrow. It mainly affects custom queries that share a URL, or the same data source set up twice with different mappings. The built-in Google Sheets item and list queries aren't affected, because the item query sends an extra header.
We haven't had a report of it.
Notes for a fix
- The current behaviour also stops identical failed and
PUT,PATCHorDELETErequests from being sent twice. A fix needs to keep that, or accept the change. - Changing
cache_getorcache_savewould break subclasses that override them. - A subclass may also rely on the current cache keys.
The options considered and their tradeoffs are in #874.
- Dominant language
- PHP
- Stars
- 86
- Forks
- 14
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 23
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/remote-data-blocks
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Automattic/remote-data-blocks#883 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Automattic/remote-data-blocks#879 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Automattic/remote-data-blocks#821 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Automattic/remote-data-blocks#640 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Automattic/remote-data-blocks#312 ·
Maintainers usually reply within 1 day
All issues in Automattic/remote-data-blocks
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
recca0120/vscode-phpunit#620 ·
Maintainers usually reply within 1 day
-
Validation rule generation for recursive Data objects is unbounded (O(payload depth))Possibly taken @irfanm96 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
spatie/laravel-data#1226 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day