AI助手支持GPT4.0
This is a WordPress object cache backend that supports the MemCachier caching service.
这是一个支持MemCachier缓存服务的WordPress对象缓存后端。
It requires Memcached ver.它需要 Memcached版本。 2.2.0 PECL package or greater for SASL support.2.2.0 PECL软件包或更高版本以支持SASL。 p>
它需要 Memcached版本。 2.2.0 PECL package or greater for SASL support.
2.2.0 PECL package
2.2.0 PECL软件包
This is a fork of tollmanz object cache, adding SASL and
这是 tollmanz 对象缓存的分支,添加了SASL和
binary protocol support for cloud based caches.
二进制协议支持基于云的缓存。 p>
ul>
Make sure you have libmemcached installed, built with SASL.
确保已安装 libmemcached ,该文件是使用SASL构建的。
See the Memcached Requirements.
请参见 Memcached要求。 p>
li>
Install the Memcached ver.安装 Memcached版本。 2.2.0 PECL package.2.2.0 PECL程序包。 p>
安装 Memcached版本。 2.2.0 PECL package.
2.2.0 PECL程序包
Define the Memcached servers and SASL credentials in your wp-config.php, as follows:
在wp-config.php中定义Memcached服务器和SASL凭据,如下所示: p>
global $memcached_servers; global $ memcached_servers;$memcached_servers = array( array( 'host', port ) );$ memcached_servers = array(array('host',port));global $memcached_username;全局$ memcached_username;$memcached_username = 'sasl_username';$ memcached_username ='sasl_username';global $memcached_password;全局$ memcached_password;$memcached_password = 'sasl_password';$ memcached_password ='sasl_password'; code> pre>
global $ memcached_servers;$memcached_servers = array( array( 'host', port ) );$ memcached_servers = array(array('host',port));global $memcached_username;全局$ memcached_username;$memcached_username = 'sasl_username';$ memcached_username ='sasl_username';global $memcached_password;全局$ memcached_password;$memcached_password = 'sasl_password';$ memcached_password ='sasl_password';
$memcached_servers = array( array( 'host', port ) );
$ memcached_servers = array(array('host',port));
global $memcached_username;
全局$ memcached_username;
$memcached_username = 'sasl_username';
$ memcached_username ='sasl_username';
global $memcached_password;
全局$ memcached_password;
$memcached_password = 'sasl_password';
$ memcached_password ='sasl_password';
code> pre>
Alternatively, set the environment variables, MEMCACHE_SERVERS, MEMCACHE_USERNAME and MEMCACHE_PASSWORD.
MEMCACHE_SERVERS
MEMCACHE_USERNAME
MEMCACHE_PASSWORD
或者,设置环境变量 MEMCACHE_SERVERS code>, MEMCACHE_USERNAME code>和 MEMCACHE_PASSWORD code>。 The expected format for MEMCACHE_SERVERS is 'server1:port1,server2:port2,server3:port3'. MEMCACHE_SERVERS code>的预期格式为'server1:port1,server2:port2,server3:port3' code>。 p>
MEMCACHE_SERVERS code>, MEMCACHE_USERNAME code>和 MEMCACHE_PASSWORD code>。 The expected format for MEMCACHE_SERVERS is 'server1:port1,server2:port2,server3:port3'. MEMCACHE_SERVERS code>的预期格式为'server1:port1,server2:port2,server3:port3' code>。 p>
MEMCACHE_USERNAME code>和 MEMCACHE_PASSWORD code>。 The expected format for MEMCACHE_SERVERS is 'server1:port1,server2:port2,server3:port3'. MEMCACHE_SERVERS code>的预期格式为'server1:port1,server2:port2,server3:port3' code>。 p>
MEMCACHE_PASSWORD code>。 The expected format for MEMCACHE_SERVERS is 'server1:port1,server2:port2,server3:port3'. MEMCACHE_SERVERS code>的预期格式为'server1:port1,server2:port2,server3:port3' code>。 p>
The expected format for MEMCACHE_SERVERS is 'server1:port1,server2:port2,server3:port3'.
'server1:port1,server2:port2,server3:port3'
MEMCACHE_SERVERS code>的预期格式为'server1:port1,server2:port2,server3:port3' code>。 p>
'server1:port1,server2:port2,server3:port3' code>。 p>
ol>
Note: If running on Heroku or AppFog, just install the MemCachier add-on and your conifguration environment variables will be set.
注意 strong>:如果在Heroku或AppFog上运行,只需安装MemCachier附加组件,即可设置配置环境变量。 p>Move object-cache.php to wp-content/object-cache.php将object-cache.php移至wp-content / object-cache.php p> li>To test the WordPress object cache setup, add the following code as an MU plugin:要测试WordPress对象缓存设置,请将以下代码添加为MU插件: p>`php `php code> pre> <?php $key = ‘dummy’;$ key ='dummy'; $value = ‘100’;$ value =‘100’; p>$dummy_value = wp_cache_get( $key ); $ dummy_value = wp_cache_get($ key); p>if ( $value !== $dummy_value ) { if($ value!== $ dummy_value){ echo “The dummy value is not in cache.echo“虚拟值不在缓存中。Adding the value now.”; 立即添加值。”; wp_cache_set( $key, $value );wp_cache_set($ key,$ value); } else { } else { echo “Value is ” .回显“值是”。 $dummy_value .$ dummy_value。 “.”。 The WordPress Memcached Backend is working!”;WordPress Memcached后端正在运行!”; } } `` p>After adding the code, reload your WordPress site twice.添加代码后,重新加载WordPress网站两次。On the second load, you should see a success message printed at the top of the page.在第二次加载时,您应该会在页面顶部看到成功消息。Remove the MU plugin after you’ve verified the setup.验证设置后,请删除MU插件。 p> li> ol>
Move object-cache.php to wp-content/object-cache.php
将object-cache.php移至wp-content / object-cache.php p>
To test the WordPress object cache setup, add the following code as an MU plugin:
要测试WordPress对象缓存设置,请将以下代码添加为MU插件: p>
`php `php code> pre> <?php $key = ‘dummy’;$ key ='dummy'; $value = ‘100’;$ value =‘100’; p>$dummy_value = wp_cache_get( $key ); $ dummy_value = wp_cache_get($ key); p>if ( $value !== $dummy_value ) { if($ value!== $ dummy_value){ echo “The dummy value is not in cache.echo“虚拟值不在缓存中。Adding the value now.”; 立即添加值。”; wp_cache_set( $key, $value );wp_cache_set($ key,$ value); } else { } else { echo “Value is ” .回显“值是”。 $dummy_value .$ dummy_value。 “.”。 The WordPress Memcached Backend is working!”;WordPress Memcached后端正在运行!”; } } `` p>After adding the code, reload your WordPress site twice.添加代码后,重新加载WordPress网站两次。On the second load, you should see a success message printed at the top of the page.在第二次加载时,您应该会在页面顶部看到成功消息。Remove the MU plugin after you’ve verified the setup.验证设置后,请删除MU插件。 p>
`php
<?php
$key = ‘dummy’;
$ key ='dummy';
$value = ‘100’;
$ value =‘100’; p>
$dummy_value = wp_cache_get( $key );
$ dummy_value = wp_cache_get($ key); p>
if ( $value !== $dummy_value ) {
if($ value!== $ dummy_value){
echo “The dummy value is not in cache.
echo“虚拟值不在缓存中。
Adding the value now.”;
立即添加值。”;
wp_cache_set( $key, $value );
wp_cache_set($ key,$ value);
} else {
echo “Value is ” .
回显“值是”。
$dummy_value .
$ dummy_value。
“.
”。
The WordPress Memcached Backend is working!”;
WordPress Memcached后端正在运行!”;
}
`
` p>
After adding the code, reload your WordPress site twice.
添加代码后,重新加载WordPress网站两次。
On the second load, you should see a success message printed at the top of the page.
在第二次加载时,您应该会在页面顶部看到成功消息。
Remove the MU plugin after you’ve verified the setup.
验证设置后,请删除MU插件。 p>
原文出处:http://www.sanshu.cn/a/7576.html
群主管理都是支付大佬