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

Boost: add rudimentary plugin system to cache system #40091

Open
donnchawp opened this issue Nov 7, 2024 · 0 comments
Open

Boost: add rudimentary plugin system to cache system #40091

donnchawp opened this issue Nov 7, 2024 · 0 comments
Labels
[Boost Feature] Page Cache [Plugin] Boost A feature to speed up the site and improve performance. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Comments

@donnchawp
Copy link
Contributor

We should allow sites to customize or interact with the caching process when pages are served, but that code loads before most of WordPress. This code can still use actions and filters, since they are loaded very early. As part of a separate PR, we should add more filters and hooks to the caching system.

We will need to load this code and execute it when advanced-cache.php loads.

The loader will check for the existence of a particular file and load that, executing it as a PHP script. By default, that should be wp-content/boost-cache/extend.php

Since the wp-content/boost-cache/ directory is made by the web server, the site owner may not have write access to it, so we should first check for a constant that points at where the file should be. That constant can be defined in wp-config.php, which again might not be writable, but it's one modification vs many modifications to a file in a read-only directory.
I'll leave it up to the implementation to decide on what constant to use.

@donnchawp donnchawp added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Plugin] Boost A feature to speed up the site and improve performance. [Boost Feature] Page Cache labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Boost Feature] Page Cache [Plugin] Boost A feature to speed up the site and improve performance. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

No branches or pull requests

1 participant