dwnload / wp-rest-api-object-cache Goto Github PK
View Code? Open in Web Editor NEWEnable object caching for WordPress' REST API. Aids in increased response times of your applications endpoints.
License: MIT License
Enable object caching for WordPress' REST API. Aids in increased response times of your applications endpoints.
License: MIT License
After an endpoint is correctly cached, subsequent calls may fail with an error 500.
Here is the php log:
php_1 | [29-Apr-2018 16:52:16] WARNING: [pool www] child 78 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught Exception: Serialization of 'Closure' is not allowed in /var/www/html/web/wp/wp-includes/functions.php:440"
php_1 | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "Stack trace:"
php_1 | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#0 /var/www/html/web/app/object-cache.php(1130): serialize(Object(WP_REST_Response))"
php_1 | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#1 /var/www/html/web/app/object-cache.php(836): WP_Object_Cache->maybe_serialize(Object(WP_REST_Response))"
php_1 | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#2 /var/www/html/web/app/object-cache.php(227): WP_Object_Cache->set('/wp-json/wp-api...', Object(WP_REST_Response), 'rest_api', 600)"
php_1 | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#3 /var/www/html/web/app/plugins/wp-rest-api-object-cache/src/RestApi/RestDispatch.php(225): wp_cache_set('/wp-json/wp-api...', Object(WP_REST_Response), 'rest_api', 600)"
php_1 | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#4 /var/www/html/web/app/plugins/wp-rest-api-object-cache/src/RestApi/RestDispatch.php(146): Dwnload\WpRestApi\RestApi\RestDispatch->getCachedResult(Object(WP_REST_Server), Object(WP_REST_Request), '/wp-json/wp-api...', 'rest_api')"
php_1 | [29-Apr-2018 16:32:19] WARNING: [pool www] child 87 said into stderr: "#5 /var/www/html/vendor/thefrosty/wp-utilities/src/Plugin/HooksTrait.php(145): Dwnload\WpRestApi\RestApi\RestDispatch->preDispatch..."
php_1 | 172.18.0.8 - 29/Apr/2018:16:32:18 +0000 "GET /index.php" 500
Also, there is a warning message:
php_1 | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, cannot access protected method Dwnload\WpRestApi\WpAdmin\Admin::renderPage() in /var/www/html/web/wp/wp-includes/class-wp-hook.php on line 286"
php_1 | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP Stack trace:"
php_1 | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP 1. {main}() /var/www/html/web/wp/wp-admin/options-general.php:0"
php_1 | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP 2. require_once() /var/www/html/web/wp/wp-admin/options-general.php:10"
php_1 | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP 3. do_action($tag = *uninitialized*, $arg = *uninitialized*) /var/www/html/web/wp/wp-admin/admin.php:224"
php_1 | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP 4. WP_Hook->do_action($args = *uninitialized*) /var/www/html/web/wp/wp-includes/plugin.php:453"
php_1 | [29-Apr-2018 16:27:21] WARNING: [pool www] child 87 said into stderr: "NOTICE: PHP message: PHP 5. WP_Hook->apply_filters($value = *uninitialized*, $args = *uninitialized*) ****
If the only place to flush the object cache is in the admin menu bar, and visting the site on mobile WordPress hides all menu items except the home, profile or add new post(s) items.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.