Malte asked me to file an issue to explain the problem more verbose.
The AMP documentation on update-cache request says to construct an URL as follows:
https://example-com.<cache.updateCacheApiDomainSuffix>/update-cache/c/s/example.com/article?amp_action=flush&_ts=<ts_val>&_url_signature=<sig_val>
In this example, the substring "example.com/article" is essentially the article URL (minus "https://"). URL-encoding the article URL does not seem to be required (not mentioned in the docs and not visible in the example either since the / is obviously unencoded).
But what if my AMP article URL is not "example.com/article" but "example.com/article?amp=1" (where "example.com/article" is the non-AMP version)? What should the generated URL look like?
Will the AMP cache somehow notice that in the following example ?amp=1 is part of the article URL and not a superfluous parameter passed to the "update-cache" endpoint?
https://example-com.<cache.updateCacheApiDomainSuffix>/update-cache/c/s/example.com/article?amp=1&_action=flush&_ts=<ts_val>&_url_signature=<sig_val>?
I think the clean solution would be to urlencode the article URL.
/to @Gregable
This issue seems to be in Pending Triage for awhile. @Gregable Please triage this to an appropriate milestone.
This issue seems to be in Pending Triage for awhile. @Gregable Please triage this to an appropriate milestone.
This issue seems to be in Pending Triage for awhile. @Gregable Please triage this to an appropriate milestone.
Closing bug as this is an AMP Cache specific. That project is tracking internally at b/113542032
Is there a way for me to be notified if/when this issue is resolved?
Since the issue is being tracked internally we will not be able to provide regular updates, but feel free to reply to this github issue or ping us on slack for more updates.
@Gregable Do you have news about this issue with "update-cache" requests? We've continued using the old "update-ping" requests but they have stopped working today (404 response). So there is currently no way for us to ping AMP caches about updated URLs.
Let's keep this open until the internal bug is fixed.
@steffenweber It appears that, yes, you should be able to mix your original query parameters in with the update-cache parameters. If any of them share the same name, make sure the original values appear after the update-cache values, like ?amp_ts=<the value update-cache uses>&_ts=<your original value>. I'm not sure what happens if your original URL has some unusual query serialization like ?blah&&_ts=2 -- this nuance might get lost by the URL parser & reserializer.
@twifkak Thank you for helping! :)
So if I understand you correctly, then the request
should update the URL
https://www.computerbase.de/2019-01/nvidia-geforce-rtx-2060-test/?amp=1
Is this correct?
@steffenweber Yes, that's correct.
My understanding is that the original question was answered and we can close this bug. Please respond if you think there is something more to do here.