[wordpress插件] Country Caching For WP Super CacheWP超级缓存的国家/地区缓存

wordpress 插件 文章 2020-04-03 15:40 453 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Bonus also makes Cookie Notice work correctly with WPSC (whether using country/EU geolocation or not).

奖金还可使Cookie通知与WPSC正常配合使用(无论是否使用国家/欧盟地理位置)。

Allows WP Super Cache to display the correct page/widget content for a visitor’s country when you are using geo-location;

当您使用地理位置时,允许WP Super Cache显示访问者所在国家/地区的正确页面/小工具内容;

solves problems like these reported on WordPress.Org and

解决了 WordPress.Org

StackOverflow.

StackOverflow

A similar extension is available for Comet Cache.

适用于Comet Cache

This plugin builds an extension script that enables Super Cache to create separate snapshots (cache) for each page based on country location.

此插件构建了一个扩展脚本,该脚本使Super Cache可以根据国家/地区的位置为每个页面创建单独的快照(缓存)。

Separate snapshots can be restricted to specific countries.

可以将单独的快照限制在特定的国家/地区。

E.g.

例如。

if you are based in the US but customize some content for Canadian or Mexican visitors, you can restrict separate caching to CA & MX visitors;

如果您位于美国,但为加拿大或墨西哥访问者自定义了一些内容,则可以将单独的缓存限制为CA和MX访问者;

and all other visitors will see the same cached (“US”) content.

其他所有访问者都将看到相同的缓存(“美国”)内容。

You can also specify a single snapshot for a group of countries e.g.

您还可以为一组国家/地区指定单个快照,例如

all European Union countries.

所有欧盟国家。

It works on both normal WordPress and Multisite (see FAQ) installations.

它可以在普通的WordPress和Multisite(请参阅FAQ)安装上使用。

More info in the user guide

/“ rel =” nofollow“>用户指南

Identification of visitor country for caching

要缓存的访问者国家/地区

Via Cloudflare or Maxmind (when the plugin is first enabled it uploads GeoLite2 data created by MaxMind, available from http://www.maxmind.com ).

通过Cloudflare或Maxmind(首次启用该插件时,它将上传由MaxMind创建的GeoLite2数据,可从http://www.maxmind.com获得)。

Cloudflare works with any PHP version, but Maxmind Geolite2 requires PHP 5.4 or later.

Cloudflare可与任何PHP版本一起使用,但Maxmind Geolite2需要PHP 5.4或更高版本。

It is also possible to connect a different GeoLocation sytem of your choice (see documentation).

还可以连接您选择的其他地理位置系统(请参见文档)。

If you use Cloudflare and have “switched on” their GeoLocation option ( see Cloudflare's instructions ) then it will be used to identify visitor country.

-Geolocation-do-“ rel =” nofollow“> Cloudflare的说明),然后将其用于识别访问者所在的国家/地区。

If not, then the Maxmind Country Database will be used.

否则,将使用Maxmind国家数据库。

Updating (If not using Cloudflare for country) The installed Maxmind Country/IP data file will lose accuracy over time.

更新(如果未在国家/地区使用Cloudflare),安装的Maxmind Country / IP数据文件将随着时间的流逝而失去准确性。

To automate a monthly update of this file, install and enable the Category Country Aware (CCA) plugin (Country Caching

要每月自动更新此文件,请安装并启用类别国家/地区感知(CCA)插件(“国家/地区缓存”

and the Cataegory Country Aware (CCA) plugins use the same Maxmind data file in the same folder and the CCA plugin includes code for its update).

并且Cataegory Country Aware(CCA)插件在同一文件夹中使用相同的Maxmind数据文件,而CCA插件包含其更新代码)。

The CCA plugin has many other features and functionality you may find useful.

CCA插件还具有许多其他有用的功能。

Alternatively you can manually update (FAQ below).

或者,您可以手动更新(下面的常见问题解答)。

ADVICE

广告

I don’t recommend you use ANY Caching plugin UNLESS you know how to use an FTP program (e.g. Filezilla).

我不建议您使用任何缓存插件,除非您知道如何使用FTP程序(例如Filezilla)。

Caching plugins can cause “white screen” problems for some users.

缓存插件可能对某些用户造成“白屏”问题。

WP Super Cache is no different;

WP Super Cache没什么不同。

when I checked the first page of its support forum it included 4 posts like this

当我查看其支持论坛的第一页时,其中包含4条此类帖子

a>.

一个>。

Sometimes the only solution is to manually delete files using FTP or OS command line.

有时,唯一的解决方案是使用FTP或OS命令行手动删除文件。

When deactivated/deleted via Dashboard->Plugins;

通过仪表板->插件禁用/删除时;

the Country Caching plugin deletes its files, but in “white screen” situations you may have to resort to “manual” deletion – see FAQ for instructions.

Country Caching插件会删除其文件,但是在“白屏”情况下,您可能不得不求助于“手动”删除-有关说明,请参阅FAQ。

License

许可证

This program is free software licensed under the terms of the GNU General Public

该程序是根据 GNU General Public条款获得许可的免费软件

License version 2 as published by the Free Software Foundation.

自由软件基金会发布的许可证版本2 。

In particular please note the following:

尤其请注意以下几点:

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;

分发该程序的目的是希望它会有用,但没有任何担保;

without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

甚至没有对适销性或特定用途适用性的暗示保证。

安装步骤

(Obvously you must have WP Supercache installed and activated. If you wish, you can switch off caching in it settings until you have finished your Country Cachching set-up.)

(很可能必须安装并激活WP Supercache。如果愿意,可以在其设置中关闭缓存,直到完成“国家/地区缓存”设置为止。)

Install Country Caching plugin in normal way.

以常规方式安装“国家/地区缓存”插件。

Then go to “Dashboard->WPSC Country Caching”.

然后转到“仪表板-> WPSC国家/地区缓存”。

Check the “Enable WPSC Country Caching add-on” box, and save settings.

选中“ 启用WPSC国家/地区缓存附加组件”框,然后保存设置。

下载地址
https://downloads.wordpress.org/plugin/country-caching-extension-for-wp-super-cache.zip
-EOF-

AI助手支持GPT4.0