Title: CC-Cache
Author: Clearcode
Published: <strong>2016 年 4 月 18 日</strong>
Last modified: 2016 年 10 月 3 日

---

搜尋外掛

![](https://ps.w.org/cc-cache/assets/banner-772x250.png?rev=1398253)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/cc-cache/assets/icon-256x256.png?rev=1398253)

# CC-Cache

 由 [Clearcode](https://profiles.wordpress.org/clearcodehq/) 開發

[下載](https://downloads.wordpress.org/plugin/cc-cache.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/cc-cache/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/cc-cache/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/cc-cache/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/cc-cache/#developers)

 [技術支援](https://wordpress.org/support/plugin/cc-cache/)

## 外掛說明

The CC-Cache plugin supports caching of Posts, Pages, and any public Custom Post
Types – including single and archive pages.
 It also supports a “static page display”
option: Front page, Posts page, and standard Latest Posts listing. This plugin is
compatible with Multisite WordPress installations.

#### How does it work?

When a user (i.e. someone who is logged out of WordPress) opens a page for the first
time, the plugin saves all the rendered html to a file in the wp-content/cache directory.

From this moment onwards, any user who accesses the site will be served content 
directly from the generated html file. WordPress at this point is not initialized
for this page. The generated cache file will be removed when you make changes to
the corresponding Post/Page, and then the process starts from the beginning. You
can also clear all cached files from the Cache options page (visit the ‘Settings
> Cache’ page in wp-admin), or manually delete files from the wp-content/cache directory.

#### Tips & Tricks

You can check if a page’s content is served from a cache file by opening the page’s
source code in the browser and scrolling down to the closing `<body>` html tag.

If the content is cached, you should see a comment with the date and time the page
was last cached, for example:

You can disable cache for a single request and get the raw html by adding `cache
=false` to a URL’s parameter, for example:
 http://example.com/?cache=false

You can disable cache for a single request and get the raw html by adding `cache
=false` HTTP header.

Logged-in users always get the raw html.

#### Ideas for future versions

 1. Add support for Categories, Tags, Taxonomies, and Authors.
 2. Add support for RSS/Atom feeds.
 3. Add support for Nginx and IIS servers.
 4. Add support for other WordPress Filesystem Methods.
 5. Add regenerate function for all cache files.

### Requirements

 1. Apache server
 2. mod_rewrite
 3. Write access to wp-content/cache directory
 4. PHP interpreter version >= 5.3

## 螢幕擷圖

[⌊WordPress Cache Settings - Visit the 'Settings > Cache' page, select your preferred
options and save them.⌉⌊WordPress Cache Settings - Visit the 'Settings > Cache' 
page, select your preferred options and save them.⌉[

**WordPress Cache Settings** – Visit the ‘Settings > Cache’ page, select your preferred
options and save them.

[⌊Post Cache Settings - You can disable the cache function for individual posts 
and pages by marking the Disable checkbox in Edit Post/Edit Page.⌉⌊Post Cache Settings-
You can disable the cache function for individual posts and pages by marking the
Disable checkbox in Edit Post/Edit Page.⌉[

**Post Cache Settings** – You can disable the cache function for individual posts
and pages by marking the Disable checkbox in Edit Post/Edit Page.

## 安裝方式

#### From your WordPress Dashboard

 1. Go to ‘Plugins > Add New’
 2. Search for ‘CC-Cache’
 3. Activate the plugin from the Plugin section in your WordPress Dashboard.

#### From WordPress.org

 1. Download ‘CC-Cache’.
 2. Upload the ‘cc-cache’ directory to your ‘/wp-content/plugins/’ directory using 
    your favorite method (ftp, sftp, scp, etc…)
 3. Activate the plugin from the Plugin section in your WordPress Dashboard.

#### Once Activated

 1. Visit the ‘Settings > Cache’ page, select your preferred options and save them.
 2. Add the following constant to your `wp-config.php` file: `define( 'FS_METHOD', '
    direct' );`.
 3. Add the rule listed in ‘Settings > Cache’ to the beginning of your `.htaccess` 
    file.

You can disable the cache function for individual posts and pages by marking the
Disable checkbox in Edit Post/Edit Page.

#### Multisite

The plugin can be activated and used for just about any use case.

 * Activate at the site level to load the plugin on that site only.
 * Activate at the network level for full integration with all sites in your network(
   this is the most common type of multisite installation).

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈CC-Cache〉的開發相關工作。

參與者

 *   [ Clearcode ](https://profiles.wordpress.org/clearcodehq/)
 *   [ PiotrPress ](https://profiles.wordpress.org/piotrpress/)

[將〈CC-Cache〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/cc-cache)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/cc-cache/)、查看
[SVN 存放庫](https://plugins.svn.wordpress.org/cc-cache/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/cc-cache/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/cc-cache/)。

## 變更記錄

#### 1.3.1

_Release date: 03.10.2016_

 * Corrected notice of undefined index: clear

#### 1.3.0

_Release date: 15.09.2016_

 * Added ‘save empty cache file and incorrect content prevention’ feature by internal
   request verification.
 * Added feature to check cookies and disable cache for logged-in users.
 * Added feature to check for cache=false HTTP header to disable cache for single
   requests.
 * Corrected error when using object (e.g. table) in .htaccess rules generation.

#### 1.2.0

_Release date: 05.09.2016_

 * Added .htaccess file to increase plugin’s security.
 * Added verification condition for ABSPATH constant defined for all php files, 
   including templates
 * Added condition to enqueue css style file only when admin bar displays.
 * Added support for get_sites function introduced in WordPress 4.6 version.
 * Added new filters to templates vars.
 * Added try/catch block to support Minify exceptions.
 * Moved div and span html code to corresponding template files.
 * Corrected error of missing class on activation.
 * Corrected error with dirlist() function.

#### 1.1.0

_Release date: 20.05.2016_

 * Added auto regenerate cache files function when saving post.
 * Added Minify HTML option.
 * Added cache=false URL’s parameter to disable cache for single request.

#### 1.0.0

_Release date: 16.04.2016_

 * First stable version of the plugin.

## 中繼資料

 *  版本 **1.3.1**
 *  最後更新 **10 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 4.4.2 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.6.30**
 *  語言
 * [English (US)](https://wordpress.org/plugins/cc-cache/)
 * 標籤:
 * [Apache](https://tw.wordpress.org/plugins/tags/apache/)[cache](https://tw.wordpress.org/plugins/tags/cache/)
   [clearcode](https://tw.wordpress.org/plugins/tags/clearcode/)[mod_rewrite](https://tw.wordpress.org/plugins/tags/mod_rewrite/)
 *  [進階檢視](https://tw.wordpress.org/plugins/cc-cache/advanced/)

## 評分

這個項目尚無任何評論記錄。

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

[查看全部使用者評論](https://wordpress.org/support/plugin/cc-cache/reviews/)

## 參與者

 *   [ Clearcode ](https://profiles.wordpress.org/clearcodehq/)
 *   [ PiotrPress ](https://profiles.wordpress.org/piotrpress/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/cc-cache/)