Title: Purgely
Author: Zack Tollman
Published: <strong>11 ມັງກອນ 2016</strong>
Last modified: 15 ມິຖຸນາ 2016

---

ຄົ້ນຫາປລັກອິນ

ປລັກອິນນີ້ **ຍັງບໍ່ທັນໄດ້ຮັບການທົດສອບກັບ WordPress 3 ເວີຊັນຫຼັກຫຼ້າສຸດ**. ມັນອາດຈະ
ບໍ່ໄດ້ຮັບການເບິ່ງແຍງ ຫຼື ສະໜັບສະໜູນອີກຕໍ່ໄປ ແລະ ອາດມີບັນຫາການເຮັດວຽກຮ່ວມກັນເມື່ອ
ໃຊ້ກັບ WordPress ເວີຊັນທີ່ໃໝ່ກວ່າ.

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

# Purgely

 ໂດຍ [Zack Tollman](https://profiles.wordpress.org/tollmanz/)

[ດາວໂຫຼດ](https://downloads.wordpress.org/plugin/purgely.1.0.1.zip)

 * [ລາຍລອຽດ](https://lo.wordpress.org/plugins/purgely/#description)
 * [ການຣີວິວ](https://lo.wordpress.org/plugins/purgely/#reviews)
 *  [ການຕິດຕັ້ງ](https://lo.wordpress.org/plugins/purgely/#installation)
 * [ການພັດທະນາ](https://lo.wordpress.org/plugins/purgely/#developers)

 [ການຊ່ວຍເຫຼືອ](https://wordpress.org/support/plugin/purgely/)

## ຄຳອະທິບາຍ

Purgely manages caching behavior for WordPress sites using Fastly as an edge caching
solution. The plugin exposes useful
 APIs to help control how pages on your site
are cached, as well as provides sane defaults to make this a plug and play solution
for Fastly cache management.

The plugin handles the following:

 * Sets the `Surrogate-Control` header to control the expiration time for pages
 * Sets the `stale-while-revalidate` and `stale-if-error` `Cache-Control` directives
   for managing these special Fastly
    behaviors
 * Set groups of `Surrogate-Keys` for all pages to provide purging across multiple
   pages with one command
 * Provides invalidation of posts and related posts on save

Each of these items have sane defaults with ways to override them and configure 
them to your liking.

Additionally, the plugin exposes a WP CLI command to provide more flexible purging
options.

## ການຕິດຕັ້ງ

### Manual installation

 1. Upload the plugin directory to `/wp-content/plugins/`
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

### WP CLI installation

 1. Run `wp plugin install --activate purgely`

### Configuration

Purgely provides a number of constants that can be used to control the behavior 
of the plugin and Fastly’s cache. Users
 who wish to change these values should 
define the constants in `wp-config.php`.

After installing, you should define `PURGELY_FASTLY_KEY` and `PURGELY_FASTLY_SERVICE_ID`
in `wp-config.php`. The plugin will work without them; however, you will not be 
able to purge by surrogate key or purge all without configuring these options. To
define them copy the following code to your `wp-config.php` file, update the key
to use your key, and the service ID to match the fastly service you’re using:

    ```
    `
    ```

define( ‘PURGELY_FASTLY_KEY’, ’39c4820390d8f050giweda50268c7583′ );
 define( ‘PURGELY_FASTLY_SERVICE_ID’,‘
abcdefghijklmn1234567890’ ); `

Configuring other constants is similarly done by defining the constant in `wp-config.
php`. All constants are explained
 below.

**PURGELY_API_ENDPOINT**

Defines the API endpoint for Fastly. This should not usually need to be changed,
but is added in the event that Fastly
 decides to use a different API endpoint, 
or if there is a need for a user to have a special endpoint.

_default: (string) ”_

**PURGELY_ALLOW_PURGE_ALL**

Determines whether or not the plugin can issue a purge all request. Purge all can
have dire consequences for a website.
 As such, this behavior is disabled by default.
If can be turned on by setting this value to `true`.

_default: (bool) false_

**PURGELY_ENABLE_STALE_WHILE_REVALIDATE**

Determines whether or not the plugin sets the `stale-while-revalidate` directive
for the `Cache-Control` header. Setting
 this value to `false` will turn off the`
stale-while-revalidate` behavior. Note that you can manually control this behavior
via the functions exposed in the plugin regardless of this configuration option.
This option only controls the default plugin behavior.

_default: (bool) true_

**PURGELY_STALE_WHILE_REVALIDATE_TTL**

Sets the TTL for the `stale-while-revalidate` directive in seconds. The value instructs
Fastly to continue serving stale
 content while new content is generated for the
duration of the value that is set.

_default: (int) 86400_

**PURGELY_ENABLE_STALE_IF_ERROR**

Determines whether or not the plugin sets the `stale-if-error` directive for the`
Cache-Control` header. Setting
 this value to `false` will turn off the `stale-if-
error` behavior. Note that you can manually control this behavior via the functions
exposed in the plugin regardless of this configuration option. This option only 
controls the default plugin behavior.

_default: (bool) true_

**PURGELY_STALE_IF_ERROR_TTL**

Sets the TTL for the `stale-if-error` directive in seconds. The value instructs 
Fastly to continue serving stale
 content while the origin site is serving an error
for the duration of the value that is set.

_default: (int) 86400_

**PURGELY_SURROGATE_CONTROL_TTL**

Sets the TTL for the `Surrogate-Control` header in seconds. This value is the default
TTL for all pages on your site,
 unless it is cached within the app. Changing this
value changes the value for the whole site.

_default: (int) 300_

## ການຣີວິວ

![](https://secure.gravatar.com/avatar/778914d549e545a18f92dec2a5db45137baead95b17e472738a56c42a1627a21?
s=60&d=retro&r=g)

### 󠀁[Excellent cache handling](https://wordpress.org/support/topic/excellent-cache-handling/)󠁿

 [eightbits](https://profiles.wordpress.org/eightbits/) 3 ກັນຍາ 2016

Sets surrogate keys based on all posts. Saved me a lot of time.

 [ ອ່ານການຣີວິວທັງໝົດ 1 ລາຍການ ](https://wordpress.org/support/plugin/purgely/reviews/)

## ຜູ້ຮ່ວມພັດທະນາ ແລະ ຜູ້ພັດທະນາ

“Purgely” ແມ່ນຊອຟແວໂອເພັນຊອດ (Open Source). ບຸກຄົນຕໍ່ໄປນີ້ໄດ້ມີສ່ວນຮ່ວມໃນການພັດທະ
ນາປລັກອິນນີ້.

ຜູ້ຮ່ວມພັດທະນາ

 *   [ Zack Tollman ](https://profiles.wordpress.org/tollmanz/)

[ແປ “Purgely” ເປັນພາສາຂອງເຈົ້າ.](https://translate.wordpress.org/projects/wp-plugins/purgely)

### ສົນໃຈຮ່ວມພັດທະນາບໍ່?

[ເບິ່ງລະຫັດ](https://plugins.trac.wordpress.org/browser/purgely/), ກວດເບິ່ງ [ຄັງເກັບ SVN](https://plugins.svn.wordpress.org/purgely/),
ຫຼື ຕິດຕາມ [ບັນທຶກການພັດທະນາ](https://plugins.trac.wordpress.org/log/purgely/) ຜ່ານ
[RSS](https://plugins.trac.wordpress.org/log/purgely/?limit=100&mode=stop_on_copy&format=rss).

## ບັນທຶກການປ່ຽນແປງ

#### 1.0.1

 * Update key saniziation to allow all capital letters, not just A-B.

#### 1.0.0

 * Initial release.

## ຂໍ້ມູນກຳກັບ (Meta)

 *  ເວີຊັນ **1.0.1**
 *  ອັບເດດຫຼ້າສຸດເມື່ອ **10 ປີ ທີ່ຜ່ານມາ** ທີ່ຜ່ານມາ
 *  ການຕິດຕັ້ງທີ່ໃຊ້ງານຢູ່ **10+**
 *  ເວີຊັນ WordPress ** 4.2.0 ຫຼື ສູງກວ່າ **
 *  ທົດສອບເຖິງເວີຊັນ **4.3.34**
 *  ພາສາ
 * [English (US)](https://wordpress.org/plugins/purgely/)
 * ແທັກ
 * [cache invalidation](https://lo.wordpress.org/plugins/tags/cache-invalidation/)
   [caching](https://lo.wordpress.org/plugins/tags/caching/)[fastly](https://lo.wordpress.org/plugins/tags/fastly/)
   [page cache](https://lo.wordpress.org/plugins/tags/page-cache/)
 *  [ມຸມມອງຂັ້ນສູງ](https://lo.wordpress.org/plugins/purgely/advanced/)

## ການໃຫ້ຄະແນນ

 5 ຈາກທັງໝົດ 5 ດາວ.

 *  [  ການວິຈານ 5 ດາວ ຈຳນວນ 1 ລາຍການ     ](https://wordpress.org/support/plugin/purgely/reviews/?filter=5)
 *  [  ການວິຈານ 4 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/purgely/reviews/?filter=4)
 *  [  ການວິຈານ 3 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/purgely/reviews/?filter=3)
 *  [  ການວິຈານ 2 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/purgely/reviews/?filter=2)
 *  [  ການວິຈານ 1 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/purgely/reviews/?filter=1)

[ການທົບທວນຂອງທ່ານ](https://wordpress.org/support/plugin/purgely/reviews/#new-post)

[ເບິ່ງທັງໝົດ ການຣີວິວ](https://wordpress.org/support/plugin/purgely/reviews/)

## ຜູ້ຮ່ວມພັດທະນາ

 *   [ Zack Tollman ](https://profiles.wordpress.org/tollmanz/)

## ການຊ່ວຍເຫຼືອ

ມີຄຳຖາມ ຫຼື ຕ້ອງການຄວາມຊ່ວຍເຫຼືອບໍ່?

 [ເບິ່ງຟໍຣັມການຊ່ວຍເຫຼືອ](https://wordpress.org/support/plugin/purgely/)