Queries that send the same request can share parsed results

Abierto
#878 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
54/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
php, wordpress
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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, PATCH or DELETE requests from being sent twice. A fix needs to keep that, or accept the change.
  • Changing cache_get or cache_save would break subclasses that override them.
  • A subclass may also rely on the current cache keys.

The options considered and their tradeoffs are in #874.

Lenguaje dominante
PHP
Estrellas
86
Forks
14
Merge medio
1 d 5 h
PR fusionados (30 d)
23

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Automattic/remote-data-blocks

Todos los issues de Automattic/remote-data-blocks

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.