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

Pending API responses get cached for too long #186

Open
dd32 opened this issue Jun 20, 2019 · 2 comments
Open

Pending API responses get cached for too long #186

dd32 opened this issue Jun 20, 2019 · 2 comments

Comments

@dd32
Copy link

dd32 commented Jun 20, 2019

Issue Overview

When requesting a report for a specific version of a plugin, if Tide doesn't yet have a report for it it'll start to generate one and return a <p>pending</p> response.

That response then gets cached, and will return the <p>pending</p> response until it expires.
Suffixing a ?1 to the URL to bypass the URL caching then results in being able to access it.

Steps to Reproduce (for bugs)

  1. Request /api/tide/v1/audit/wporg/plugin/$slug/$version for an old version of a random plugin
  2. Hopefully observe a report-not-yet-generated page
  3. Reload it a few minutes later, get the same pending report.
  4. Suffix a cache-buster such as ?1 to the URL and see the report.
@jeffpaul
Copy link
Member

@dd32 thanks for the feedback on this one, is there a recommended length to expire the cache that's used for things on the plugin repo that we can mirror for Tide?

@kkoppenhaver
Copy link
Contributor

PR for this is here: wptide/wporg-tide-api#6

@jeffpaul jeffpaul added this to To Do in PHP Compat on WordPress.org via automation Jun 23, 2020
@jeffpaul jeffpaul moved this from To Do to In progress in PHP Compat on WordPress.org Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants