Title: Full Site Cache for CloudFront
Author: ze3kr
Published: <strong>2017 年 1 月 29 日</strong>
Last modified: 2017 年 2 月 27 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/full-site-cache-cf.svg)

# Full Site Cache for CloudFront

 作者：[ze3kr](https://profiles.wordpress.org/ze3kr/)

[下载](https://downloads.wordpress.org/plugin/full-site-cache-cf.0.0.2.zip)

 * [详情](https://cn.wordpress.org/plugins/full-site-cache-cf/#description)
 * [评价](https://cn.wordpress.org/plugins/full-site-cache-cf/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/full-site-cache-cf/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/full-site-cache-cf/#developers)

 [支持](https://wordpress.org/support/plugin/full-site-cache-cf/)

## 描述

If you blog are using CloudFront on the main WordPress domain (e.g. www.example.
com), and you want to cache HTML page for not logged in user. You could set a long“
Default TTL” for these HTML pages if the cache could invalidate automatically.

#### Invalidation behaviors

 * Invalidate the whole cache when a new post published
 * Invalidate a post page when a post updated
 * Invalidate a post page if have any comment has changed on that page
 * Each invalidation has a minimum interval of 10 minutes

#### Requirements

 * PHP 5.4+
 * WordPress 4.4+
 * A CloudFront account and AWS Access Key and Secret Key to access [CloudFront distribution](https://tlo.xyz/create-cloudfront-distribution-for-wordpress/).

#### Recommendations

 * Offload CSS, JS and medias file to another domain with a different distribution,
   because this plugin will invalidate the whole cache when updating the post.

## 安装

First, you need to [use CloudFront on your WordPress site](https://tlo.xyz/create-cloudfront-distribution-for-wordpress/).

Add the configuration code to your `wp-config.php` file **above** the line reading`/*
That’s all, stop editing! Happy blogging. */`.

Example configuration:

    ```
    $tlo_cf_id[1] = 'DISTRIBUTION_ID';
    define( 'AWS_ACCESS_KEY_ID', '********************' );
    define( 'AWS_SECRET_ACCESS_KEY', '****************************************' );
    $wp_rich_edit = true; // CloudFront will remove user-agent header, so if you want to have Visual Editor, keep this line.
    ```

This plugin supports multisite, just replace 1 in the `$tlo_cf_id[]` to the blog
id.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Full Site Cache for CloudFront」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ ze3kr ](https://profiles.wordpress.org/ze3kr/)

[帮助将「Full Site Cache for CloudFront」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/full-site-cache-cf)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/full-site-cache-cf/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/full-site-cache-cf/)，或通过[RSS](https://plugins.trac.wordpress.org/log/full-site-cache-cf/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/full-site-cache-cf/)。

## 更新日志

#### 0.0.2

 * Fixed for comment approval.
 * Changed the invalidate behavior.

#### 0.0.1

Published the first version

## 额外信息

 *  版本 **0.0.2**
 *  最后更新：**9 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 4.4 或更高版本 **
 *  已测试的最高版本为 **4.7.33**
 *  语言
 * [English (US)](https://wordpress.org/plugins/full-site-cache-cf/)
 * 标签
 * [cache](https://cn.wordpress.org/plugins/tags/cache/)[cloudfront](https://cn.wordpress.org/plugins/tags/cloudfront/)
   [Optimize](https://cn.wordpress.org/plugins/tags/optimize/)[performance](https://cn.wordpress.org/plugins/tags/performance/)
   [speed](https://cn.wordpress.org/plugins/tags/speed/)
 *  [高级视图](https://cn.wordpress.org/plugins/full-site-cache-cf/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/full-site-cache-cf/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/full-site-cache-cf/reviews/)

## 贡献者

 *   [ ze3kr ](https://profiles.wordpress.org/ze3kr/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/full-site-cache-cf/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://tlo.xyz/donate/)