scheme added to key

git-svn-id: http://plugins.svn.wordpress.org/wp-ffpc/trunk@586168 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
cadeyrn 2012-08-16 10:33:56 +00:00
parent 0b3f7eb9ae
commit fe07b27754
4 changed files with 12 additions and 8 deletions

View file

@ -65,10 +65,13 @@ if ( !$wp_ffpc_backend_status )
/* use the full accessed URL string as key, same will be generated by nginx as well
we need a data and a meta key: data is string only with content, meta is not used in nginx */
global $wp_ffpc_data_key_protocol;
$wp_ffpc_data_key_protocol = empty ( $_SERVER['HTTPS'] ) ? 'http://' : 'https://';
global $wp_ffpc_data_key;
$wp_ffpc_data_key = $wp_ffpc_config['prefix_data'] . $_SERVER['HTTP_HOST'] . $wp_ffpc_uri;
$wp_ffpc_data_key = $wp_ffpc_config['prefix_data'] . $wp_ffpc_data_key_protocol . $_SERVER['HTTP_HOST'] . $wp_ffpc_uri;
global $wp_ffpc_meta_key;
$wp_ffpc_meta_key = $wp_ffpc_config['prefix_meta'] . $_SERVER['HTTP_HOST'] . $wp_ffpc_uri;
$wp_ffpc_meta_key = $wp_ffpc_config['prefix_meta'] . $wp_ffpc_data_key_protocol . $_SERVER['HTTP_HOST'] . $wp_ffpc_uri;
/* search for valid meta entry */
global $wp_ffpc_meta;

View file

@ -10,7 +10,7 @@ http {
location @memcached {
default_type text/html;
set $memcached_key DATAPREFIX$host$request_uri;
set $memcached_key DATAPREFIX$scheme://$host$request_uri;
memcached_pass MEMCACHEDHOST:MEMCACHEDPORT;
error_page 404 = @rewrites;
}
@ -18,10 +18,8 @@ http {
location @rewrites {
rewrite ^(.*)$ /index.php?q=$1 last;
}
...
}
}
...

View file

@ -69,11 +69,13 @@ You have to remove the default yum package, named `php-pecl-memcache` and instal
= 0.4 =
2012.08.06
* tested against new WordPress versions
* added lines to "memcached" storage to be able to work with nginx as well
* added lines to "memcached" to use binary protocol ( tested with PHP Memcached version 2.0.1 )
KNOWN ISSUES
* "memcache" extension fails in binary mode; the reason is under investigation
= 0.3.2 =

View file

@ -102,8 +102,9 @@ function wp_ffpc_clear ( $post_id = false ) {
$path = substr ( get_permalink($post_id) , 7 );
if (empty($path))
return false;
$meta = $wp_ffpc_config['prefix-meta'] . $path;
$data = $wp_ffpc_config['prefix-data'] . $path;
$wp_ffpc_data_key_protocol = empty ( $_SERVER['HTTPS'] ) ? 'http://' : 'https://';
$meta = $wp_ffpc_config['prefix-meta'] . $wp_ffpc_data_key_protocol . $path;
$data = $wp_ffpc_config['prefix-data'] . $wp_ffpc_data_key_protocol . $path;
}
switch ($wp_ffpc_config['cache_type'])