Title: WP Cache Block
Author: prettyboymp
Published: <strong>2010년 6월 13일</strong>
Last modified: 2011년 2월 14일

---

플러그인 검색

이 플러그인은 **최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다**. 워드프레스의
좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 
있을 수 있습니다.

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

# WP Cache Block

 작성자: [prettyboymp](https://profiles.wordpress.org/prettyboymp/)

[다운로드](https://downloads.wordpress.org/plugin/wp-cache-block.zip)

 * [세부사항](https://ko.wordpress.org/plugins/wp-cache-block/#description)
 * [평가](https://ko.wordpress.org/plugins/wp-cache-block/#reviews)
 *  [설치](https://ko.wordpress.org/plugins/wp-cache-block/#installation)
 * [개발](https://ko.wordpress.org/plugins/wp-cache-block/#developers)

 [지원](https://wordpress.org/support/plugin/wp-cache-block/)

## 설명

Adds ability to globally cache certain segments of code.

WP Cache and some other caching plugins work amazingly well, however, their benefits
are limited in sites with a large percentage of logged in users. While working on
these projects, we, Voce Connect, found the need for a better caching solution. 
We needed to easily cache rendered portions of the theme that were the same for 
each user without caching other portions that may have user specific content. The
solution was to come up with a plugin that could be easily integrated into a theme
to help cache these blocks of content.

Requirements:

 * WordPress 2.8 or higher
 * “php5” – I’m a big proponent of dropping the php4 compatibility of WordPress 
   due to the improved OO support. Because of this, I prefer to write my plugins
   in php5 form in hopes to help push the community along.

## 설치

 1. Upload `wp-cache-block` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Add cache block areas to the slower parts of your theme. See below.

Adding a cache block only requires wrapping the section of content you want to cache
in a couple of lines of code. The key is make sure that the cache block is uniquely
idtentified based on the content it will render.

For simple content that is the same on every page:

    ```
    <?php if(wp_cacheblock_start('my-content')) : ?>
    //the content you want to cache
    <?php endif; wp_cacheblock_end(); ?>
    ```

Content that varies based on page, user, etc, will need to use key builders. Key
builders are simple classes that help make a unique key for the block of content
based on different parameters.

For caching the_loop in index.php you’ll need to add a Query_Unique_Key_Builder 
which creates a key based on passed in query_var keys:

    ```
    <?php $key_builders = array(new Query_Unique_Key_Builder( array ('paged') ) );
    <?php if(wp_cacheblock_start( 'index-loop', array('key_builders'=> $key_builders) ) ) : ?>
      //the post loop
    <?php endif; wp_cacheblock_end(); ?>
    ```

To cache the comment output, you can use the Pending_Comment_Unique_Key_Builder 
so users with pending comments will get their own cached page.

    ```
    <?php $key_builders = array( new Pending_Comment_Unique_Key_Builder() );
    <?php if(wp_cacheblock_start('index-loop', array('key_builders'=> $key_builders) ) ) : ?>
      //the comment loop
    <?php endif; wp_cacheblock_end(); ?>
    ```

If you’re having to render complex data per user, the Per_User_Unique_Key_Builder
will help create a unique key per user for the content:

    ```
    <?php $key_builders = array( new Per_User_Unique_Key_Builder() );
    <?php if(wp_cacheblock_start('index-loop', array('key_builders'=> $key_builders) ) ) : ?>
      //the user specific content
    <?php endif; wp_cacheblock_end(); ?>
    ```

## FAQ

  Do I need this plugin?

Probably not. Full page rendering is the best solution for most sites. This plugin
is really only useful for sites that have a great deal of user specific content 
areas that causes full page caching to no longer be an option.

## 후기

이 플러그인에 대한 평가가 없습니다.

## 기여자 & 개발자

“WP Cache Block”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에
기여하였습니다.

기여자

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

[자국어로 “WP Cache Block”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/wp-cache-block)

### 개발에 관심이 있으십니까?

[코드 탐색하기](https://plugins.trac.wordpress.org/browser/wp-cache-block/)는, [SVN 저장소](https://plugins.svn.wordpress.org/wp-cache-block/)
를 확인하시거나, [개발 기록](https://plugins.trac.wordpress.org/log/wp-cache-block/)
을 [RSS](https://plugins.trac.wordpress.org/log/wp-cache-block/?limit=100&mode=stop_on_copy&format=rss)
로 구독하세요.

## 변경이력

#### 0.1.1

 * Limited transient key length to 45 chars per https://core.trac.wordpress.org/
   ticket/15058
 * Fixing unique key when only a block name is provided.

#### 0.1.0

 * Initial release.

## 기초

 *  버전 **0.1.1**
 *  최근 업데이트: **16년 전**
 *  활성화된 설치 **10+**
 *  워드프레스 버전 ** 2.8 또는 그 이상 **
 *  다음까지 시험됨: **3.0.5**
 *  언어
 * [English (US)](https://wordpress.org/plugins/wp-cache-block/)
 * 태그:
 * [cache](https://ko.wordpress.org/plugins/tags/cache/)[cache block](https://ko.wordpress.org/plugins/tags/cache-block/)
   [caching](https://ko.wordpress.org/plugins/tags/caching/)[output caching](https://ko.wordpress.org/plugins/tags/output-caching/)
   [performance](https://ko.wordpress.org/plugins/tags/performance/)
 *  [고급 보기](https://ko.wordpress.org/plugins/wp-cache-block/advanced/)

## 평점

아직 제출된 리뷰가 없습니다.

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

[모든  리뷰 보기](https://wordpress.org/support/plugin/wp-cache-block/reviews/)

## 기여자

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

## 지원

할 말 있으신가요? 도움이 필요하신가요?

 [지원 포럼 보기](https://wordpress.org/support/plugin/wp-cache-block/)

## 기부

이 플러그인이 발전하도록 도우시겠습니까?

 [ 이 플러그인에 기부하기 ](http://voceconnect.com/)