Title: PigCache
Author: aixeiger
Published: <strong>Ọwẹ́wẹ̀  20, 2026</strong>
Last modified: Ọwẹ́wẹ̀  20, 2026

---

Ṣàwárí àwọn plugin

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

# PigCache

 Láti ọwọ́ [aixeiger](https://profiles.wordpress.org/aixeiger/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/pigcache.1.0.29.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/pigcache/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/pigcache/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/pigcache/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/pigcache/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/pigcache/)

## Àpèjúwe

PigCache replaces WordPress’s default object cache with **Redis** (official drop-
in pattern), using PhpRedis when available or the bundled **Predis**. Configure 
the connection with `PIGCACHE_REDIS_*` constants in wp-config.php.

Features:

 * **Redis object cache** drop-in (PhpRedis or bundled Predis)
 * **SQL query cache** (optional `db.php` drop-in) with per-table invalidation, 
   so writing to one table does not discard results that never read it
 * **Full-page HTML cache** for anonymous visitors with tag-based selective invalidation
   on content changes
 * **Fragment caching** helpers backed by Redis
 * **Tag-based selective invalidation** — only affected pages are purged when a 
   post, term, or comment changes

Every feature listed above is included and fully enabled. The plugin has no license
check, no trial period and no usage limit, and it does not contact any external 
service.

The object cache drop-in is derived from [Redis Object Cache](https://github.com/rhubarbgroup/redis-cache)(
GPLv3, Till Krüss / Rhubarb Group).

### External services

This plugin does not connect to any external service. All caching, invalidation 
and metrics happen on your own server and your own Redis instance.

## Ìgbéwọlẹ̀

 1. Upload the plugin files to `wp-content/plugins/pigcache`, or install through the
    WordPress plugins screen.
 2. Activate the plugin through the **Plugins** screen.
 3. Go to **Settings  PigCache** and use **Enable object cache (copy drop-in)** when
    you are ready.
 4. Optionally install the **SQL cache** drop-in from the same screen.
 5. For the full-page HTML cache, install the `advanced-cache.php` drop-in from the
    same screen and add `define( 'WP_CACHE', true );` to your `wp-config.php`. The 
    plugin never edits `wp-config.php` for you.

Do not run another full Redis object-cache plugin at the same time; PigCache replaces
that role.

## FAQ

### Does this work without Redis?

No. A reachable Redis server is required for the object cache (and for HTML/fragment
features that use Redis).

### Is this the same as “Redis Object Cache”?

PigCache includes its own drop-in and must not be used together with the separate“
Redis Object Cache” plugin.

## Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

## Àwọn Olùkópa & Olùgbéejáde

“PigCache” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí 
plugin yìí.

Àwọn Olùkópa

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

[Túmọ̀ “PigCache” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/pigcache)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/pigcache/), ṣàyẹ̀wò [ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/pigcache/),
tàbí ṣe àgbékalẹ̀ sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/pigcache/)
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/pigcache/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 1.0.25

 * Fixed: activating the plugin on a fresh site — or deactivating and reactivating
   it — could break the request outright. The constructor scheduled the pluginÌtumọ̀
   Yorùbá: ’s WP-Cron events on `plugins_loaded`, before `init`, and building the
   cron label touched a translation function that early. WordPress logs that as 
   a notice, but because it is the very first byte of output in the entire request,
   every later `header()` call in that request then fails with “headers already 
   sent” — which shows up as WordPress reporting unexpected output during activation,
   or the plugin being silently left deactivated. Cron registration now waits for`
   init`, like it always should have.
 * Fixed: with a cold object cache, a query could return another queryÌtumọ̀ Yorùbá:’
   s rows. Caching a result or invalidating one reaches the database itself, and
   those internal lookups overwrote the result the caller was about to read. It 
   affected the first query of each kind in a request after a cache flush, a Redis
   restart or a fresh install, and the wrong rows were then cached for the full 
   TTL. Writes were affected too: a lost `insert_id` could attach new rows to the
   wrong record.
 * Fixed: the first write to a table did not invalidate SELECTs cached before it,
   because a freshly bumped per-table epoch was indistinguishable from a missing
   one. The global epoch had the same flaw.
 * Fixed: `wp_cache_decr()` could return negative values instead of clamping at 
   zero as WordPress core does.
 * Fixed: the query-stats table was never created, because MySQL rejects a `DEFAULT`
   on a `TEXT` column.
 * Fixed: `INSERT`/`REPLACE` statements written without the optional `INTO` keyword
   were not attributed to their table.
 * The URL firewall now learns from 404s WordPress actually returned instead of 
   matching against a list of known permalinks. It no longer needs to be seeded 
   or rebuilt, and it cannot 404 real content.
 * Hardened: the URL firewallÌtumọ̀ Yorùbá: ’s `wp pigcache-fw report` command now
   strips control/escape bytes before printing request data (IP, User-Agent) to 
   the terminal, and the recorded IP is validated as a well-formed address instead
   of trusted verbatim from the `CF-Connecting-IP` header.
 * Hardened: request headers used by the URL firewall for instrumentation (User-
   Agent, Referer) are explicitly sanitized before being stored.
 * Fixed: the tag-index table used `DATETIME ... DEFAULT CURRENT_TIMESTAMP`, which
   MySQL only allows on `DATETIME` columns since 5.6.5 (older versions only allowed
   it on `TIMESTAMP`). On an older server the table silently failed to create, and
   worse, the very next activation queried a column on a table that didnÌtumọ̀ Yorùbá:’
   t exist, which WordPress reported as unexpected output during activation on any
   install with `WP_DEBUG` on. The two Pro-only tables with the same pattern are
   fixed the same way. None of the three columns had a default anyway — the code
   that writes to them was already setting the value itself.
 * Fixed: an inline SQL comment left inside a `CREATE TABLE` string was silently
   turned into a bogus column by `dbDelta()`, producing a broken `ALTER TABLE ADD
   COLUMN` on every activation after the first. Explanatory comments about column
   definitions now live outside the SQL string.
 * Tested against WordPress 7.1.

#### 1.0.24

 * Tag-based selective invalidation and per-table SQL invalidation are now part 
   of the plugin for everyone, with no license check of any kind.
 * The plugin no longer writes to `wp-config.php`; the `WP_CACHE` snippet is shown
   in the admin screen instead.
 * The Redis circuit breaker keeps its state in shared memory instead of a file 
   in the system temp directory.
 * Drop-ins resolve the plugin directory through `WP_PLUGIN_DIR` / `WPMU_PLUGIN_DIR`
   when those constants are available.

#### 1.0.1

 * Security: sanitize $_SERVER inputs in early-boot path and admin handlers.
 * Security: escape all outputs in object cache stats view.
 * HTML and fragment caches use tag-based selective invalidation when available,
   with global flush fallback.

#### 1.0.0

 * Initial release on WordPress.org.

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **1.0.29**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọ̀sẹ̀ 2 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **Tó kéré sí 10**
 *  Ẹ̀yà WordPress ** 5.8 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **7.1.2**
 *  Ẹ̀yà PHP ** 7.4 tàbí ju bẹ́ẹ̀ lọ **
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/pigcache/)
 * Àwọn àmì
 * [cache](https://yor.wordpress.org/plugins/tags/cache/)[html cache](https://yor.wordpress.org/plugins/tags/html-cache/)
   [object cache](https://yor.wordpress.org/plugins/tags/object-cache/)[performance](https://yor.wordpress.org/plugins/tags/performance/)
   [redis](https://yor.wordpress.org/plugins/tags/redis/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/pigcache/advanced/)

## Àwọn ìbò

Kò sí ìwádìí tí a tíì fi ránṣẹ́.

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

[Wo gbogbo àwọn àgbéyẹ̀wò](https://wordpress.org/support/plugin/pigcache/reviews/)

## Àwọn Olùkópa

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

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/pigcache/)