WordPress Redis对象缓存插件专业版 Object Cache Pro

WordPress Redis对象缓存插件专业版 Object Cache Pro-SODOS官网
WordPress Redis对象缓存插件专业版 Object Cache Pro
此内容为付费资源,请付费后查看
50积分
付费资源

redis5

推荐配置:

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);

高性能配置(仅适用于专业用户):

define('WP_REDIS_CONFIG', [
    'token' => 'e279430effe043b8c17d3f3c751c4c0846bc70c97f0eaaea766b4079001c',
    'host' => '127.0.0.1',
    'port' => 6379,
    'database' => 1, // change for each site
    'timeout' => 0.5,
    'read_timeout' => 0.5,
    'retry_interval' => 10,
    'maxttl' => 3600 * 24,
    'retries' => 3,
    'backoff' => 'smart',
    'compression' => 'zstd', // `zstd` compresses smaller, `lz4` compresses faster
    'serializer' => 'igbinary',
    'async_flush' => true,
    'split_alloptions' => true,
    'prefetch' => true,
    'shared' => true,
    'strict' => true,
    'debug' => false,
    'save_commands' => false,
]);

define('WP_REDIS_DISABLED', getenv('WP_REDIS_DISABLED') ?: false);

如果您有大量访问者或查询,建议使用高性能配置方法。

对于“高性能配置”设置,redis 和 redisphp 需要进行特殊编译。需要使用 igbinary 和 zstd 进行编译

© 版权声明
THE END
喜欢就支持一下吧
点赞14赞赏
评论 抢沙发

请登录后发表评论

    暂无评论内容