Open jazzsequence opened 3 weeks ago
I am not strongly against PAPC moving into the mu plugin, but the biggest loss I see to moving is our ability to iterate and version PAPC faster outside of the mu plugin as it is not tied to CMS/upstream update cadence. Divorcing upstream updates from CMS updates would ease this, but either way PAPC is essentially locked to the latest version of WordPress. Whether that's a bug or a feature likely lies in the eye of the beholder.
I do think the current split of functionality and hooks between the two can be confusing at times (tripping me up recently with #67)
The "advanced" features should be able to be toggled on/off (in the case that a user legitimately does not want the benefits of PAPC)
Is your expectation here that this would have a dashboard UI/wp_options setting, or would a filter suffice?
Is your expectation here that this would have a dashboard UI/wp_options setting, or would a filter suffice?
Specifically a visible (in the UX) toggle. We can also toggle on/off via a filter to override, but I'm thinking about people who don't want (or for now don't know that they want) to turn PAPC "on".
our ability to iterate and version PAPC faster outside of the mu plugin as it is not tied to CMS/upstream update cadence
True. However, I don't see that we're doing (or likely to do) a ton of PAPC updates such that this would be a significant issue. And, it's more a problem with the WordPress upstream deployment/update strategy than a problem with putting things into the mu-plugin specifically (we've been in this state for a long time already with not being able to "push" mu-plugin updates outside of WP releases -- and a workaround exists to just create our own Pantheon-specific releases if we needed to).
I don't see that we're doing (or likely to do) a ton of PAPC updates such that this would be a significant issue.
Also, this could be seen as a feature rather than a bug. Tying updates to WP releases means we can worry less about backwards compatibility with older versions of WordPress (except with Composer-based installs).
What would we do with the analogous PAPC Drupal module? I think we'd create confusion by eliminating the WordPress plugin but not the Drupal module.
@jazzsequence? Is your motivation more about eliminating the distinct plugin or more about getting it installed on every site?
@stevector My motivation is both.
composer.json
-- I don't know the difference between how pantheon_advanced_page_cache
works differently than pantheon-advanced-page-cache
but I don't think the end result is a Pantheon Page Cache page in the admin of every site that is not created by Pantheon Advanced Page Cache and, in fact, leaves important features missing, leading to confusion between "Page Cache" and "Advanced Page Cache" (which does not add an admin page).pantheon-mu-plugin
to pull it into the vanilla WordPress upstream and that would likely lead to conflicts (especially when customers already have it installed).It also serves a third purpose:
What's more, this is something that people are wanting and asking for. When I have brought this up in Community Slack and office hours, I always get wholehearted support for pulling PAPC into the mu-plugin and just giving it to everyone automatically, and it solves the problem of "when I update a post on my site, it does not update?" "did you install Pantheon Advanced Page Cache?" problem.
Makes sense. I think the way forward is for @scottbuscemi / @DuncanSchouten to organize / prioritize this idea in Productboard.
Productboard link: https://pantheon.productboard.com/all-notes?d=notes%2F41919565
tl;dr
We should pull the Pantheon Advanced Page Cache plugin into the Pantheon MU plugin.
Why?
Risks
Implementation
on
.If the site already has PAPC installed:
on
.If the site does not have PAPC installed:
on
.on
? List below:If the site has a version of WordPress older than 6.4:
on
state of PAPC should still be valid.If there was a problem requiring the library:
off
.Deprecating PAPC
Pantheon Advanced Page Cache will need to push one final release around the same time that this is merged and deployed to the mu-plugin.
That update should display a deprecation notice that the plugin is not longer required if you are using the most recent version of the Pantheon mu-plugin and link to a piece of documentation (to be written, perhaps a release note) that discusses the change, the impact, the new defaults (and documentation to turn off the automattic inclusion of the "advanced" caching) and link to documentation for the filter to override the default cache max age options. A similar note should be added to the top of the readme files.
At that point, we can remove any secrets and archive the Pantheon Advanced Page Cache repository on GitHub (and Packagist).