PHPackages                             friendsofsymfony/http-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. [HTTP &amp; Networking](/categories/http)
4. /
5. friendsofsymfony/http-cache

ActiveLibrary[HTTP &amp; Networking](/categories/http)

friendsofsymfony/http-cache
===========================

Tools to manage HTTP caching proxies with PHP

3.2.0(3mo ago)35915.1M↓57%64[7 issues](https://github.com/FriendsOfSymfony/FOSHttpCache/issues)[1 PRs](https://github.com/FriendsOfSymfony/FOSHttpCache/pulls)20MITPHPPHP ^8.1CI failing

Since Mar 4Pushed 2mo ago10 watchersCompare

[ Source](https://github.com/FriendsOfSymfony/FOSHttpCache)[ Packagist](https://packagist.org/packages/friendsofsymfony/http-cache)[ Docs](https://github.com/friendsofsymfony/FOSHttpCache)[ RSS](/packages/friendsofsymfony-http-cache/feed)WikiDiscussions 3.x Synced 1w ago

READMEChangelog (10)Dependencies (28)Versions (78)Used By (20)

FOSHttpCache
============

[](#foshttpcache)

[![CI](https://github.com/FriendsOfSymfony/FOSHttpCache/actions/workflows/ci.yml/badge.svg)](https://github.com/FriendsOfSymfony/FOSHttpCache/actions/workflows/ci.yml)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/7059c0f7d9744ae261d25756739e1dbcc39ced0153b80ae2c7c84dfba16de820/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f467269656e64734f6653796d666f6e792f464f534874747043616368652f6261646765732f7175616c6974792d73636f72652e706e673f733d62633236336434646562343562656364623134363962373165383633306335653635656664636634)](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSHttpCache/)[![Code Coverage](https://camo.githubusercontent.com/8cdf39517a5013d6ec1be7f9e869efb34f36a82e1b135a5c582c62aa72d21496/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f467269656e64734f6653796d666f6e792f464f534874747043616368652f6261646765732f636f7665726167652e706e673f733d61313964663762623765383330363432666239333738393161656265386333653163396635396330)](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSHttpCache/)[![Latest Stable Version](https://camo.githubusercontent.com/1eb41b14162ceabcaff25b1a641ff28582f8186d18590360f775ad02a84fc9b6/68747470733a2f2f706f7365722e707567782e6f72672f667269656e64736f6673796d666f6e792f687474702d63616368652f762f737461626c652e737667)](https://packagist.org/packages/friendsofsymfony/http-cache)[![Documentation Status](https://camo.githubusercontent.com/ab4edc2c6e6fa0f768f2aeebfbc567eb5de937862eb3254212b9cc06e64cf1bc/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f666f736874747063616368652f62616467652f3f76657273696f6e3d6c6174657374)](https://foshttpcache.readthedocs.io/)

Introduction
------------

[](#introduction)

This library integrates your PHP applications with HTTP caching proxies such as Varnish. Use this library to send invalidation requests from your application to the caching proxy and to test your caching and invalidation code against a Varnish setup.

It does this by abstracting some caching concepts and attempting to make sure these can be supported across Varnish, Nginx and Symfony HttpCache.

If you use Symfony, have a look at the [FOSHttpCacheBundle](https://github.com/FriendsOfSymfony/FOSHttpCacheBundle). The bundle provides the invalidator as a service, along with a number of Symfony-specific features to help with caching and caching proxies.

Features
--------

[](#features)

- Send [cache invalidation requests](http://foshttpcache.readthedocs.io/en/stable/cache-invalidator.html)with minimal impact on performance.
- Cache tagging abstraction for caching proxy systems that support it.
- Use the built-in support for [Varnish](http://foshttpcache.readthedocs.io/en/stable/varnish-configuration.html), [NGINX](http://foshttpcache.readthedocs.io/en/stable/nginx-configuration.html), the [Symfony reverse proxy from the http-kernel component](http://foshttpcache.readthedocs.io/en/stable/symfony-cache-configuration.html), the CDNs [fastly](https://www.fastly.com/) and [cloudflare](https://www.cloudflare.com/), or implement your own caching proxy client.
- [Test your application](http://foshttpcache.readthedocs.io/en/stable/testing-your-application.html)against your Varnish or NGINX setup with the help of a PHPUnit functional test case.

Documentation
-------------

[](#documentation)

For more information, see [the documentation](http://foshttpcache.readthedocs.io/en/stable/).

License
-------

[](#license)

This library is released under the MIT license. See the included [LICENSE](LICENSE) file for more information.

###  Health Score

74

—

ExcellentBetter than 100% of packages

Maintenance84

Actively maintained with recent releases

Popularity67

Solid adoption and visibility

Community45

Growing community involvement

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 58.6% 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 ~58 days

Recently: every ~153 days

Total

76

Last Release

64d ago

Major Versions

1.4.5 → 2.1.x-dev2018-03-17

1.4.6 → 2.10.02020-12-02

2.15.3 → 3.0.02024-05-04

2.16.1 → 3.1.02024-07-24

2.x-dev → 3.1.12025-06-17

PHP version history (7 changes)1.0.0-alpha1PHP &gt;=5.3.3

2.0.0-alpha1PHP ^5.5.9||^7.0.0

2.0.0-beta1PHP ^5.6||^7.0.0

2.1.0PHP ^5.6 || ^7.0.0

2.9.0PHP ^7.1

2.10.0PHP ^7.2 || ^8.0

3.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/76576?v=4)[David Buchmann](/maintainers/dbu)[@dbu](https://github.com/dbu)

![](https://www.gravatar.com/avatar/54c045456672a15a85dd65e79418d0f3375322df38ac4dedb5d66487d86ab592?d=identicon)[ddeboer](/maintainers/ddeboer)

---

Top Contributors

[![dbu](https://avatars.githubusercontent.com/u/76576?v=4)](https://github.com/dbu "dbu (646 commits)")[![ddeboer](https://avatars.githubusercontent.com/u/89267?v=4)](https://github.com/ddeboer "ddeboer (270 commits)")[![lsmith77](https://avatars.githubusercontent.com/u/300279?v=4)](https://github.com/lsmith77 "lsmith77 (61 commits)")[![Toflar](https://avatars.githubusercontent.com/u/481937?v=4)](https://github.com/Toflar "Toflar (14 commits)")[![DemigodCode](https://avatars.githubusercontent.com/u/36764562?v=4)](https://github.com/DemigodCode "DemigodCode (11 commits)")[![hpatoio](https://avatars.githubusercontent.com/u/249948?v=4)](https://github.com/hpatoio "hpatoio (10 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (8 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (7 commits)")[![alexander-schranz](https://avatars.githubusercontent.com/u/1698337?v=4)](https://github.com/alexander-schranz "alexander-schranz (6 commits)")[![jdreesen](https://avatars.githubusercontent.com/u/424602?v=4)](https://github.com/jdreesen "jdreesen (5 commits)")[![XWB](https://avatars.githubusercontent.com/u/1032281?v=4)](https://github.com/XWB "XWB (5 commits)")[![blankse](https://avatars.githubusercontent.com/u/998558?v=4)](https://github.com/blankse "blankse (5 commits)")[![jnonon](https://avatars.githubusercontent.com/u/959315?v=4)](https://github.com/jnonon "jnonon (5 commits)")[![zlatio](https://avatars.githubusercontent.com/u/545553?v=4)](https://github.com/zlatio "zlatio (4 commits)")[![digitalkaoz](https://avatars.githubusercontent.com/u/293591?v=4)](https://github.com/digitalkaoz "digitalkaoz (4 commits)")[![gimler](https://avatars.githubusercontent.com/u/200904?v=4)](https://github.com/gimler "gimler (4 commits)")[![villfa](https://avatars.githubusercontent.com/u/2891564?v=4)](https://github.com/villfa "villfa (4 commits)")[![wickedOne](https://avatars.githubusercontent.com/u/343850?v=4)](https://github.com/wickedOne "wickedOne (4 commits)")[![snc](https://avatars.githubusercontent.com/u/216730?v=4)](https://github.com/snc "snc (3 commits)")[![trickreich](https://avatars.githubusercontent.com/u/16644200?v=4)](https://github.com/trickreich "trickreich (3 commits)")

---

Tags

cachinghttpnginxphpvarnishhttpcachingnginxvarnishpurgeinvalidation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/friendsofsymfony-http-cache/health.svg)

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

###  Alternatives

[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28146.3k](/packages/phpro-http-tools)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.7k](/packages/guzzlehttp-psr7)[php-http/httplug-bundle

Symfony integration for HTTPlug

38921.5M58](/packages/php-http-httplug-bundle)[friendsofsymfony/http-cache-bundle

Set path based HTTP cache headers and send invalidation requests to your HTTP cache

43813.7M63](/packages/friendsofsymfony-http-cache-bundle)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

84735.1k](/packages/flow-php-flow)

PHPackages © 2026

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