pantheon-systems / pantheon-advanced-page-cache

Plugin to make the most of Pantheon's Global CDN with advanced page caching options.
https://wordpress.org/plugins/pantheon-advanced-page-cache/
GNU General Public License v2.0
35 stars 13 forks source link

Issue with Pantheon Page Cache and AMP #234

Open Premium-Petware opened 1 year ago

Premium-Petware commented 1 year ago

Firstly, apologies for the non-technical format used to raise this issue. I am a site / store owner reporting an issue relating to my Website's wordpress theme (X-Store by 8 Theme). The issue I am experiencing is failure of AMP to work as expected on mobile devices.

The developers have identified that the issue is occurring as some items are being cached and others not. If Pantheon Page Cache TTL is set to Zero (as advised by Pantheon Helpdesk for testing), then AMP works as expected.

Below is the detail provided the developer, 8 Theme.

image

In the attached image they have identified that “woocommerce_locate_template” is being cached, but “wc_get_template_part” is not being cached.

I have sent them the Pantheon documentation relating to Pantheon Page Caching as provided by the Pantheon helpdesk. This did not provide a solution for them.

They have asked if I can contact the plugin developers to ask if one of the following options can be utilised:

1/ Could it be set locally (for customer device) when AMP version starts to load? or 2/ Could it be globally set for all customers who come from Mobile devices? or 3/ Could we add globally this filter “pantheon_session_expiration“ in AMP plugin so it will disable cache for that customer when viewing AMP version of web-site.

Appreciate your assistance with this.

Regards,

Blair

jazzsequence commented 1 year ago

Hey Blair, sorry for the delay on responding to this. I think that you are looking at the Pantheon Page Cache component in our mu-plugin rather than the Pantheon Advanced Page Cache plugin that deals exclusively with handling caches on the CDN (I realize the naming convention is confusing).

I wanted to get some clarification from you so I fully understand the request. In your post, you said:

1/ Could it be set locally (for customer device) when AMP version starts to load? or 2/ Could it be globally set for all customers who come from Mobile devices?

Can you clarify the "it" here? Are you asking if the caching can be set locally? Or the TTL?

3/ Could we add globally this filter “pantheon_session_expiration“ in AMP plugin so it will disable cache for that customer when viewing AMP version of web-site.

Is the request here to allow the default_ttl here to be able to be filtered? We do not maintain the AMP plugin, so, while we might be able to suggest additions to their plugin (their GitHub repository is over here, there's no guarantee that they would merge them, especially if it was for a specific hosting provider/platform.