• 本帖最后由 尼欧一方通行 于 2017-11-13 11:08 编辑 *

这段意思是不是先在wp-config.php里面加一行require_once( ABSPATH . 'redis-page-cache-config.php' );然后在wp根目录建立一个redis-page-cache-config.php文件再把最下面那堆代码填进去?我这样做了以后打开网站报错啊。PHP文件应该用结尾啊。我手动加上以后

55098

打开网站白屏只出现一行提示错误语法报错
Parse error: syntax error, unexpected '...' (T_ELLIPSIS), expecting ')' in /www/wwwroot/ssss.design/redis-page-cache-config.php on line 11

This plugin does not have a settings UI or anything like that. All configuration is done strictly from a PHP file through the $redis_page_cache_config global. Create a redis-page-cache-config.php and place it next to your wp-config.php file in your WordPress install. Use the following code in wp-config.php to include this file during runtime:

// After the ABSPATH definition, but prior to loading wp-settings.php
require_once( ABSPATH . 'redis-page-cache-config.php' );
The contents of your file can define the plugin configuration settings:

$redis_page_cache_config = array();

// Change the cache time-to-live to 10 minutes
$redis_page_cache_config['ttl'] = 600;

// Ignore/strip these cookies from any request to increase cachability.
$redis_page_cache_config['ignore_cookies'] = array( 'wordpress_test_cookie', 'openstat_ref' );

// Ignore/strip these query variables to increase cachability.
$redis_page_cache_config['ignore_request_keys'] = array( 'utm_source', 'utm_medium', ... );

// Vary the cache buckets depending on the results of a function call.
// For example, if you have any mobile plugins, you may wish to serve
// all mobile requests from a different cache bucket:

$redis_page_cache_config['unique'] = array( 'is_mobile' => my_is_mobile() );

// There are some other configuration options you may wish to adjust. You can
// find them all by looking at the contents of the advanced-cache.php file.

55099