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

Send update pings to AMP Caches #598

Closed
mjangda opened this issue Dec 28, 2016 · 8 comments
Closed

Send update pings to AMP Caches #598

mjangda opened this issue Dec 28, 2016 · 8 comments
Labels
Blocked Enhancement New feature or improvement of an existing one WS:Core Work stream for Plugin core

Comments

@mjangda
Copy link
Contributor

mjangda commented Dec 28, 2016

On post update and delete. See https://developers.google.com/amp/cache/update-ping https://developers.google.com/amp/cache/update-cache

@mjangda mjangda added P0 High priority Enhancement New feature or improvement of an existing one labels Dec 28, 2016
@westonruter westonruter changed the title Send update pings to Google CDN Send update pings to AMP Caches May 22, 2019
@westonruter
Copy link
Member

Related: #2382 (Dynamically load list of AMP Caches).

@westonruter
Copy link
Member

We need to get more clarity on this API before we dig into this.

@westonruter westonruter removed the P0 High priority label Sep 5, 2019
@jonoalderson
Copy link

What needs to happen to move this forward?

I see a lot of problems and complaints out in the wild about cache staleness, the lack of tools to sync/update data, etc.

Anecdotally, it's a big barrier to adoption from a lot of organizations who might otherwise be convinced to make the leap!

@archon810
Copy link

Yes! I'd say this is the #1 issue we're still facing with AMP daily.

I recently tried to make another effort to revive this task so hopefully we'll get some much-needed clarity regarding caches soon so that @westonruter can proceed with the implementation.

ampproject/amp.dev#3348

ampproject/amphtml#24326

cc @morsssss

@westonruter
Copy link
Member

Yes, we can't really move forward with some cache purging logic in the AMP plugin until there is more clarity on purging the AMP Cache(s) generally.

@kmyram kmyram added the WS:Core Work stream for Plugin core label Aug 5, 2020
@laras126
Copy link

laras126 commented Jan 7, 2021

Hi there @westonruter! My team is looking to build an admin interface for AMP Cache purging by URL. Our implementation plan is as follows:

  • Serving public key
    • Generate a common keypair per the documentation
    • Hook in to request to intercept the .well-known/amphtml/apikey.pub request
    • Set correct content-type header, and any other headers mentioned in the documentation
    • Output the public key
  • Interface for purging
    • Create a submenu page under the AMP plugin
    • In lieu of saving the submitted value, queue a purge-request cron job (for immediate execution, to make it async) and discard value
  • Cron purge job
    • Retrieve and cache list of AMP caches as provided by AMP project
    • Generate signed URL and submit to each AMP cache

I encountered this issue for sending update pings, and wanted to check – would the above scope be useful as a contribution to the AMP WP plugin? Or are there still issues with purging AMP Cache that need to be clarified before this can be pursued (per above comment from Jan '20)?

cc @ethitter

@westonruter
Copy link
Member

westonruter commented Jan 7, 2021

Hi @LaraS @laras126! Good to hear from you.

The implementation plan seems sound. My main concern is that the update-cache API doesn't appear to be work reliably per ampproject/amphtml#24326 or at least not quickly. But I don't have much experience with it, to be honest. To get more clarity on that I'd recommend following up with the AMP core team in that issue.

What I suggest is that you first implement this in a standalone extension plugin for the AMP plugin and verify that it works as expected. By being in a separate “feature plugin” to start with, there won't be issues with the PR going stale or being blocked by a plugin release. Once the feature plugin is working then it could be merged into the AMP plugin directly.

@LaraS
Copy link

LaraS commented Jan 8, 2021

Hi @laras126, I think this tag was for you.

@westonruter westonruter closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Enhancement New feature or improvement of an existing one WS:Core Work stream for Plugin core
Projects
None yet
Development

No branches or pull requests

8 participants