7

W3 total cache reads:

Cache SSL (https) requests Cache SSL requests (uniquely) for improved performance.

enter image description here

now i want hard caching for all pages, if https or not, that always a cached version is returned. Thing is, i cannot disable https for the pages, as we would be ranking lower on google, as non https gives you a penalty nowadays.

what does this sentence really mean?

4

1 回答 1

4

短版:这意味着页面缓存规则默认不会缓存 HTTPS 特定页面。所以 (http://example.com/page1) 会被缓存,但 (https://example.com/page2) 不会。
这样做true会导致缓存自动创建页面缓存的特定 SSL 版本。

默认情况下,该选项设置为 false

'pgcache.cache.ssl' => array(
        'type' => 'boolean',
        'default' => false

如果设置为 true 则:

/**
         * Set HTTPS
         */
        if ( $config->get_boolean( 'pgcache.cache.ssl' ) ) {
            $rules .= "    RewriteCond %{HTTPS} =on\n";
            $rules .= "    RewriteRule .* - [E=W3TC_SSL:_ssl]\n";
            $rules .= "    RewriteCond %{SERVER_PORT} =443\n";
            $rules .= "    RewriteRule .* - [E=W3TC_SSL:_ssl]\n";
            $env_W3TC_SSL = '%{ENV:W3TC_SSL}';
        }
于 2016-12-28T19:10:47.363 回答