Skip to content

A little help with updating cache #24326

@archon810

Description

@archon810

Hi,

We recently launched AMP after a year of working on it (see https://www.androidpolice.com/2019/08/31/android-police-now-supports-google-amp/?amp), but realized that content updating doesn't work, and we need a little help.

https://www.androidpolice.com/.well-known/amphtml/apikey.pub was originally not served as plaintext, but that's been rectified is. It's possible that all we need is some sort of flush so that Google ingests it.

  1. https://developers.google.com/amp/cache/update-cache#update-rsa-keys states that to update the key, we can also ping https://example-com.<cache.updateCacheApiDomainSuffix>/r/s/example.com/.well-known/amphtml/apikey.pub which in our case should be https://www-androidpolice-com.cdn.ampproject.org/v/s/www.androidpolice.com/.well-known/amphtml/apikey.pub, but that's a 404.

  2. I tried joining https://amphtml.slack.com to ask the questions, but it seems to be only for @google.com users. Found https://bit.ly/amp-slack-signup and submitted a request. Hopefully that's still the right way to get in.

  3. Finally, the request to dump cache I'm trying to make is something like https://www-androidpolice-com.cdn.ampproject.org/update-cache/c/s/www.androidpolice.com/2019/08/31/android-police-now-supports-google-amp/%3famp?amp_action=flush&amp_ts=1567319166&amp_url_signature=Hkpfwk1YoewxjBAyaDEtIJ2EB9PWqBY_CeuuICQKmaPkCZ56zKdE9ROoiWdYfWaE-iUJjp2bX_cyHXl4jOqAkeKXeoJNjXwISSohPz_6E7nB4e94iLPxEGojDsEqvZ4ybSRBlsip1NNI5vXGBZKIPv-28GeoDtTGCyVxvPwnJRTn0POkQRfbWlM_hcLq9QlfVqV9w9jjm2TJ6K7Vk3NnsEsFqtsZsAsBbjYUVwiuxnCFNgyIljs8izLxySkWV8Ks6Z5ESMqVTruhSinc1iHB-bRuFQYzvM8JoiS9KoiWWRg4RgDHjNs2VKTx88kescVKgxl5BvwvgyOxKG7J0xAmK1, but it returns

403. That’s an error.

Your client does not have permission to get URL /update-cache/c/s/www.androidpolice.com/2019/08/31/android-police-now-supports-google-amp/%3Famp?amp_action=flush&amp_ts=1567319166&amp_url_signature=Hkpfwk1YoewxjBAyaDEtIJ2EB9PWqBY_CeuuICQKmaPkCZ56zKdE9ROoiWdYfWaE-iUJjp2bX_cyHXl4jOqAkeKXeoJNjXwISSohPz_6E7nB4e94iLPxEGojDsEqvZ4ybSRBlsip1NNI5vXGBZKIPv-28GeoDtTGCyVxvPwnJRTn0POkQRfbWlM_hcLq9QlfVqV9w9jjm2TJ6K7Vk3NnsEsFqtsZsAsBbjYUVwiuxnCFNgyIljs8izLxySkWV8Ks6Z5ESMqVTruhSinc1iHB-bRuFQYzvM8JoiS9KoiWWRg4RgDHjNs2VKTx88kescVKgxl5BvwvgyOxKG7J0xAmK1 from this server. (Client IP address: 73.189.194.95)

Invalid public key due to ingestion error: Invalid Content

That’s all we know.

Presumably, this points to an inability to read the key?

  1. For AMP urls that end with ?amp, do we need to send a request to https://example-com.<cache.updateCacheApiDomainSuffix>/update-cache/c/s/example.com/article%3famp?amp_action=flush... or https://example-com.<cache.updateCacheApiDomainSuffix>/update-cache/c/s/example.com/article?amp&amp_action=flush...?

  2. Regarding cache, do I understand it correctly that if we don't send a max-age cache-control header, the cache will never be updated, but if we do, it'll be updated once the max-age runs out without having to ping update-cache? Or do we still need to update-cache for every time we edit the content?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions