PHPackages                             gravitatenz/fta-cache - 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. gravitatenz/fta-cache

ActiveLibrary[Caching](/categories/caching)

gravitatenz/fta-cache
=====================

Simple twig extension for adding cache headers

v0.0.3(4y ago)04BSD-3-ClausePHPPHP &gt;=7.4.0

Since Aug 16Pushed 4y ago2 watchersCompare

[ Source](https://github.com/GravitateNZ/fta-cache)[ Packagist](https://packagist.org/packages/gravitatenz/fta-cache)[ RSS](/packages/gravitatenz-fta-cache/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (7)Versions (4)Used By (0)

fta-cache
=========

[](#fta-cache)

Simple twig extension to allow templates to set caching headers

Install with composer in the usual fashion

`composer install gravitatenz/fta-cache`

Add the event listener to your services

```
services:
    GravitateNZ\fta\cache\Event\CacheControlListener: ~
    GravitateNZ\fta\cache\Twig\CacheControlExtension: ~
```

Then drop in your twig

```
{% do setPrivate() %}
{% do setPublic() %}
{% do setMaxAge(1000) %}
{% do doNotCache() %}
```

or

```
{{ do setPrivate() }}
{{ do setPublic() }}
{{ do setMaxAge(1000) }}
{{ do doNotCache() }}
```

This can also be injected into a controller etc, and the listener and used directly.

All of these will defer to the internal Symfomny session logic, if you are running a session, except for the `doNotCache` this will turn that off and force the headers cache-control and surrogate-control headers to be set to `max-age=0, nostore, private`

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

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 ~3 days

Total

3

Last Release

1776d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1974218?v=4)[John Lennard](/maintainers/yakmoose)[@yakmoose](https://github.com/yakmoose)

---

Top Contributors

[![yakmoose](https://avatars.githubusercontent.com/u/1974218?v=4)](https://github.com/yakmoose "yakmoose (13 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gravitatenz-fta-cache/health.svg)

```
[![Health](https://phpackages.com/badges/gravitatenz-fta-cache/health.svg)](https://phpackages.com/packages/gravitatenz-fta-cache)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[shopware/storefront

Storefront for Shopware

684.6M236](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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