Title: WP Fragment Cache
Author: mariuspass
Published: <strong>2014年4月26日</strong>
Last modified: 2014年6月18日

---

プラグインを検索

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

![](https://s.w.org/plugins/geopattern-icon/wp-fragment-cache.svg)

# WP Fragment Cache

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

[ダウンロード](https://downloads.wordpress.org/plugin/wp-fragment-cache.zip)

 * [詳細](https://ja.wordpress.org/plugins/wp-fragment-cache/#description)
 * [レビュー](https://ja.wordpress.org/plugins/wp-fragment-cache/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/wp-fragment-cache/#installation)
 * [開発](https://ja.wordpress.org/plugins/wp-fragment-cache/#developers)

 [サポート](https://wordpress.org/support/plugin/wp-fragment-cache/)

## 説明

**This plugin requires PHP version 5.3.6 or greater and can’t be activated without
a [persistent backend](https://codex.wordpress.org/Class_Reference/WP_Object_Cache#Persistent_Cache_Plugins)
for the [WordPress Object Cache](https://codex.wordpress.org/Class_Reference/WP_Object_Cache).**

Adds ability to cache particular sections of your site. This plugin is for people
who can’t use a full page cache or for sites with lots of pages and with frequent
changes.
 It can cache entire loops with the WP_Query(bypassing the database queries)
or only the html output of the loop and if the query results has changed(comment
added, post was edited, postmeta has changed …) the cache will be invalidated and
regenerated.

### Example usage:

    ```
    <?php if ( ! WP_Fragment_Cache::output( $wp_query_or_blockname, $duration ) ): ?>

      //content to be cached

      <?php WP_Fragment_Cache::store(); ?>
    <?php endif; ?>
    ```

#### Parameters:

**$wp_query_or_blockname**
 (mixed/string) (optional) a WP_Query(WP_Comment_Query)
result or a string. Default: the file and the line where the call was initiated(
e.g. widgets/most-commented.php:18).

**$duration**
 (int/string) (optional) Defines how many seconds to keep the cache
for. If you pass 0 the cache will not expire. If you pass the string “only_today”
the cache will expire at the end of the current day. You can use [WordPress Time Constants](https://codex.wordpress.org/Transients_API#Using_Time_Constants).
Default: 86400 (one day).

### Advanced usage:

See the [wiki pages](https://github.com/mariuspass/wp-fragment-cache/wiki) on GitHub

## インストール

 1. You should have a [persistent backend](https://codex.wordpress.org/Class_Reference/WP_Object_Cache#Persistent_Cache_Plugins)
    for the [WordPress Object Cache](https://codex.wordpress.org/Class_Reference/WP_Object_Cache)
    enabled. This plugin can’t be activated without a persistent cache.
 2. Download the plugin and unzip.
 3. Upload them to `/wp-content/plugins/` directory on your WordPress installation.
 4. Then activate the WP Fragment Cache plugin from Plugins page.
 5. Edit your template files to include WP Fragment Cache. See the [Description tab](https://wordpress.org/extend/plugins/wp-fragment-cache/)

## FAQ

  I can’t activate the plugin.

Please make sure that you have a [persistent backend](https://codex.wordpress.org/Class_Reference/WP_Object_Cache#Persistent_Cache_Plugins)
for the [WordPress Object Cache](https://codex.wordpress.org/Class_Reference/WP_Object_Cache)
enabled.

## 評価

このプラグインにはレビューがありません。

## 貢献者と開発者

WP Fragment Cache はオープンソースソフトウェアです。以下の人々がこのプラグインに
貢献しています。

貢献者

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

[“WP Fragment Cache” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/wp-fragment-cache)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/wp-fragment-cache/)する
か、[SVN リポジトリ](https://plugins.svn.wordpress.org/wp-fragment-cache/)をチェック
するか、[開発ログ](https://plugins.trac.wordpress.org/log/wp-fragment-cache/)を 
[RSS](https://plugins.trac.wordpress.org/log/wp-fragment-cache/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 1.0.4

 * PHP 5.3 compatibility fix.
 * Make PHP version 5.3.6 minimal requirement.

#### 1.0.3

 * Fix example usage code block.

#### 1.0.2

 * Improve the description of the persistent cache requirement to avoid any confusion.

#### 1.0.1

 * Add README and CHANGELOG.
 * Add link for Advanced usage.

#### 1.0.0

 * Initial release.

## メタ

 *  バージョン **1.0.4**
 *  最終更新日 **12年前**
 *  有効インストール数 **10+**
 *  WordPress バージョン ** 3.7.0またはそれ以降 **
 *  検証済み最新バージョン: **3.9.40**
 *  言語
 * [English (US)](https://wordpress.org/plugins/wp-fragment-cache/)
 * タグ
 * [cache](https://ja.wordpress.org/plugins/tags/cache/)[cache block](https://ja.wordpress.org/plugins/tags/cache-block/)
   [caching](https://ja.wordpress.org/plugins/tags/caching/)[output caching](https://ja.wordpress.org/plugins/tags/output-caching/)
   [performance](https://ja.wordpress.org/plugins/tags/performance/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/wp-fragment-cache/advanced/)

## 評価

レビューはまだ送信されていません。

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

[すべてのレビューを見る](https://wordpress.org/support/plugin/wp-fragment-cache/reviews/)

## 貢献者

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

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/wp-fragment-cache/)