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

Rewrite the plugin #747

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open

Rewrite the plugin #747

wants to merge 51 commits into from

Conversation

donnchawp
Copy link
Contributor

Initial import of framework for rewrite.
Also includes some work on configuration saving.

Also includes some work on configuration saving.
We'll use it to write to the global config file.
The functions will check if advanced-cache.php exists and WP_CACHE is
defined in wp-config.php
The plugin will attempt to create the file advanced-cache.php  and add
WP_CACHE to wp-config.php
@CGastrell
Copy link

Since you're working almost "solo" on this, I'd just approve it. But if you come up with some simple tests so I can say "works", I'd have no problem testing it :)

Use a HEREDOC to create the advanced-cache.php and add functions to
check and add WPCACHEHOME to wp-config.php
Rename the get_cache_dir() function so it has the right prefix.
* Use the config class to get the configuration as we need it to write
too for debugging.
* Add a new class to add debugging.

Next TODO: create a blank configuration files to save to.
Instead of creating a local $config just use $this->config->config.
* Renamed caching to file-cache
* Add cache debug setting to admin page.
* Added Page class to represent the current page.
* And more ..
@stathis
Copy link

stathis commented Dec 28, 2020

While you are at it, why don't you add php-brotli support to it?
I'm already maintaining a fork of WPSC with brotli support, maybe it could be of help.

This extension is already in some repositories, and most Nginx nowadays support brotli_static .

Some checks on "cacheability" can only be run after WordPress has loaded
so query vars are defined.
Fix UA check, remove url check, and fix privacy status of post check
function.
This function will cache various blog settings for the shutdown process
since $wpdb may have been destroyed by the time shutdown happens.
* Move query vars into config class.
* Add get_cache_meta_information() for non-anon requests.
* Add Page set_env() to replace base file to setup request info.
* Replace wp_super_cache_request_uri with WPSC_URI constant
* Add get_response_headers
* Add get_post_id
* Fire wp_set_env on 'template_redirect' so query vars are set.
* Put post_id in a config variable.
* Fix the blog cache path since only MU installs with have a "blogs"
directory.
This will allow us to use different cache storage backends in the
future.
* Move DISABLE_SUPERCACHE and WPCACHEHOME checks into page class.
* Delete wp-cache-base code as it was moved elsewhere already.
* Define $wp_super_cache_config in pre-wp-cache.php and use object
rather than config array. Fix associated code.
* Delete wpsc_is_backend - it's moved elsewhere.
* Disable debugging while creating the debug log, or we run into a loop.
@kraftbj kraftbj mentioned this pull request Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants