PHPackages                             gmazzap/fc-post-content-handler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. gmazzap/fc-post-content-handler

ActiveLibrary[Caching](/categories/caching)

gmazzap/fc-post-content-handler
===============================

Post content handler for Fragment Cache

2.0.0(11y ago)4151GPL-2.0+PHPPHP &gt;=5.4

Since Aug 25Pushed 11y ago1 watchersCompare

[ Source](https://github.com/gmazzap/FCPostContentHandler)[ Packagist](https://packagist.org/packages/gmazzap/fc-post-content-handler)[ RSS](/packages/gmazzap-fc-post-content-handler/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Post Content Handler for Fragment Cache
---------------------------------------

[](#post-content-handler-for-fragment-cache)

Post Content Handler for Fragment Cache is an extension of the awesome WordPress plugin ["Fragment Cache"](https://github.com/Rarst/fragment-cache) by [Andrey "Rarst" Savchenko](http://www.rarst.net/).

Fragment Cache allows partial and async caching of heavy front-end elements. It currently supports caching navigation menus, widgets, and galleries.

Post Content Handler for Fragment Cache (PCHFC) adds an additional "cache handler" to allow caching of post content in singular views.

PCHFC was realized for a client site, where a premium theme forced to build page content using an insane number of nested shortcodes, ending up in a quite slow page loading.

Full-page caching was not an option, because in that site there are (outside of post content) a lot of user-specific stuff.

Thanks to Fragment Cache I was able to code this handler that allowed me to successfully cache post content, without affecting the rest of the page.

Of course, posts having simple, text only content should **not** be cached, otherwise page loading time increase instead of decrease: for this reason the plugin add a metabox in the post edit screen where is possible to enable or disable the post content caching.

[![Post edit screen metabox](screenshot-01.png)](screenshot-01.png)

A client requirement was that metabox should be only visible to users with specific capability. So I added a setting page (accessible from Settings -&gt; Fragment Cache) where is possible to change the capability required to view the metabox and enable or disable post content fragment caching.

[![Settings for Post Content Handler for Fragment Cache](screenshot-02.png)](screenshot-02.png)

As you can see in the screenshot, another option is available: the possibility to choose for which post types the post content caching should be available. When custom post types are registered, they are also visible and selectable in that setting, but unselected by default.

\###Standalone Mode###

As said, PCHFC is just an extension of Fragment Cache, however, even if that plugin is not installed and activated in WordPress, thanks to Fragment Cache [Composer](https://getcomposer.org/) support, a copy of the plugin is "embedded" in Post Content Handler folder and so PCHFC can work in "standalone" mode: i.e. you can install PCHFC without having to install Fragment Cache.

When Fragment Cache is installed, it enables the 3 core handlers:

- Menu
- Widget
- Gallery

and they can only disabled via code. See [docs](https://github.com/Rarst/fragment-cache#how-to-disable-caching) for more info.

When in standalone mode, PCHFC adds an additional setting that allow to enable / disable the 3 core handlers.

[![Settings for Post Content Core Handlers](screenshot-03.png)](screenshot-03.png)

\#Requirements#

- [Composer](https://getcomposer.org/)
- PHP 5.4+
- WordPress 3.9+

\#Installation#

PCHFC is a [Composer](https://getcomposer.org/) package and can be installed in plugin directory via:

```
composer create-project gmazzap/fc-post-content-handler --no-dev

```

\#Gotchas#

PCHFC is in development and largely experimental. It has been tested in a very limited amount of conditions and sites. I suggest to test it in a staging / development environment before using it in production.

\#License#

Post Content Handler for Fragment Cache is released under GPLv2+, just like Fragment Cache. Please refers to [Fragment Cache readme](https://github.com/Rarst/fragment-cache#license-info) for license of 3rd parties code required by Fragment Cache.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~65 days

Total

2

Last Release

4209d ago

Major Versions

1.0 → 2.0.02014-10-30

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2208282?v=4)[Giuseppe Mazzapica](/maintainers/gmazzap)[@gmazzap](https://github.com/gmazzap)

---

Top Contributors

[![gmazzap](https://avatars.githubusercontent.com/u/2208282?v=4)](https://github.com/gmazzap "gmazzap (17 commits)")

### Embed Badge

![Health badge](/badges/gmazzap-fc-post-content-handler/health.svg)

```
[![Health](https://phpackages.com/badges/gmazzap-fc-post-content-handler/health.svg)](https://phpackages.com/packages/gmazzap-fc-post-content-handler)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
