Object Cache Pro 插件 1.24 版本

Object Cache Pro 插件 1.24 版本-牧鸭人博客
Object Cache Pro 插件 1.24 版本
此内容为付费资源,请付费后查看
1.88
限时特惠
6.9
立即购买
您当前未登录!建议登陆后购买,可保存购买订单
付费资源
图片[1]-Object Cache Pro 插件 1.24 版本-牧鸭人博客

配置方法

wp-config.php 中添加:

define('WP_REDIS_CONFIG', [
'token' => 'e279430effe043b8c17d3f3c751c4c0846bc70c97f0eaaea766b4079001c',
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0, // change for each site
'maxttl' => 3600 * 24 * 7, // 7 days
'timeout' => 1.0,
'read_timeout' => 1.0,
'prefetch' => true,
'split_alloptions' => true,
'strict' => true,
'debug' => false,
]);

define('WP_REDIS_DISABLED', false);

常见问题

1.fnmatch() 报错,解决方案

可以在插件代码里添加一个兼容函数,以此解决 fnmatch() 未定义的问题

// 在 wp-config.php 文件中添加以下兼容函数
if (!function_exists('fnmatch')) {
    function fnmatch($pattern, $string) {
        return @preg_match(
            '/^' . strtr(preg_quote($pattern, '/'), array(
                '\*' => '.*',
                '\?' => '.',
                '\[' => '[',
                '\]' => ']',
            )) . '$/i', $string
        ) !== false;
    }
}
© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容