-
Notifications
You must be signed in to change notification settings - Fork 810
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
REST API Issues #25541
Comments
I've added missing settings in Automattic/wp-super-cache#215, along with the following:
|
With Cache Stats, are you talking about reformating this response: GET /wp-json/wp-super-cache/v1/stats
If so, I'm not sure what the URI property is supposed to return. Could you propose what the full response is supposed to look like here? We can definitely adjust this. |
Regarding |
In terms of the saving, I've refactored that endpoint a bit to be more explicit in the mapping of fields to saving methods and in the process uncovered some typos in these save field for The |
@donnapep ^^^ |
I believe that is the endpoint for regenerating the cache stats, and it should return the updated cache stats with the structure defined below. The plan was to also return this data from the settings endpoint as well though because regenerating the stats can take awhile. The format is as per the below:
URI would be the URI from the following screen capture of cached / expired files on the Contents tab: |
To clarify, none of the settings were saving. To save in Calypso, you can go to Let me know if you need more info. Thx! |
I'm not sure if this work is still in progress, but here are some things I've noticed:
These fields aren't being returned:
If there are no notices, the endpoint returns: UPDATE: Adding one more missing setting. ;)
The warning could be added to the notices endpoint and eliminate the need to pass |
Definitely a work in progress. The internals of WPSC don't lend themselves very well to this type of work, so it is going to be a lot of trial and error to get there. I'll go through all of these today with your Calypso branch and see what I can do to fix as many of these as possible. :) |
I added compression warnings. The notice will appear if either of these are true (or both true):
If the notice is given you can hide the compression setting. |
I need to remove cache_gzencode. Use cache_compression instead to enable or disable it. |
cache_rejected_user_agent is what you should use for the rejected user agents. I fixed the "boolification" of those array settings (cache_acceptable_files and cache_rejected_uri) |
You can use cache_compression to tell if gzip encoding is enabled or not. |
In 48c7f09 I fixed saving of configuration settings. Update the settings on the preload page and In 9f1072e I fixed saving of wp_cache_refresh_single_only (or refresh_current_only_on_comments) |
The cache file listing looks similar to that above now (163bcfe) but I changed it slightly so it shows directories instead of files, and lists the lower and upper age of file(s) in the directory. Deleting a directory (from wp-admin) deletes the supercache AND wpcache files in that directory. |
As of bc9bba0 you can set cache_compression to enable or disable cache compression/gzip encoding. |
In 9ba185a I fixed the problem with is_super_cache_enabled. The plugin was setting it to false because of GET parameters in the URL. I fixed it by loading the configuration page in the "get settings" function. Had to take care of WPLOCKDOWN too, as it's a constant and you can't load constants twice without triggering a warning or error. |
In 08917cd I added a "reset" API parameter that will reset the configuration, copying the sample configuration file over, and setting up some default garbage collection variables. |
I removed the cache_stats setting and added the cache_type setting. |
TO DO
Notices
The text was updated successfully, but these errors were encountered: