2022/12/09 09:28
今天继续折腾Wordpress,Site Health里一直提示:"Page cache is not detected and the server response time is slow\nPerformance"
安装了WP Super Cache
的插件,但还是速度慢,这个慢可能暂时是无法解决的了,毕竟是通过VPN接入进去的,其中的网络时延应该占了大头。
Cache建完了之后,果然速度快了许多,还是很不错的。
然后又加载了Redis服务器:
- 增加plugin:
Redis Object Cache By Till Krüss
- 修改配置文件:
wp-config.php
define( 'WP_REDIS_HOST', '127.0.0.1' ); define( 'WP_REDIS_PORT', 6379 ); // define( 'WP_REDIS_PASSWORD', 'secret' ); define( 'WP_REDIS_TIMEOUT', 1 ); define( 'WP_REDIS_READ_TIMEOUT', 1 );
// change the database for each site to avoid cache collisions
// values 0-15 are valid in a default redis config.
define( 'WP_REDIS_DATABASE', 0 );
参考配置:https://github.com/rhubarbgroup/redis-cache/wiki/Connection-Parameters
以及其他配置:https://github.com/rhubarbgroup/redis-cache/wiki/Configuration-Options
另外, 刷了大概250道高级的大数据的题,接下来继续。
2022年12月09日