PHPackages                             dmk/mkvarnish - 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. dmk/mkvarnish

ActiveTypo3-cms-extension[Caching](/categories/caching)

dmk/mkvarnish
=============

Varnish extension for TYPO3

v13.0.1(9mo ago)312.1k↓30.8%2[1 issues](https://github.com/DMKEBUSINESSGMBH/mkvarnish/issues)GPL-2.0-or-laterPHPCI passing

Since Nov 27Pushed 4mo ago21 watchersCompare

[ Source](https://github.com/DMKEBUSINESSGMBH/mkvarnish)[ Packagist](https://packagist.org/packages/dmk/mkvarnish)[ Docs](http://www.dmk-ebusiness.de/)[ RSS](/packages/dmk-mkvarnish/feed)WikiDiscussions 13.4 Synced 1mo ago

READMEChangelog (2)Dependencies (13)Versions (35)Used By (0)

MK VARNISH
==========

[](#mk-varnish)

[![TYPO3 compatibility](https://camo.githubusercontent.com/ddc63947136741cd1687ca861ad6451422d80832b763684822659b49961a1fbb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31302e3425323025374325323031312e352d6f72616e67653f6d61784167653d33363030267374796c653d666c61742d737175617265266c6f676f3d7479706f33)](https://camo.githubusercontent.com/ddc63947136741cd1687ca861ad6451422d80832b763684822659b49961a1fbb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31302e3425323025374325323031312e352d6f72616e67653f6d61784167653d33363030267374796c653d666c61742d737175617265266c6f676f3d7479706f33)[![Latest Stable Version](https://camo.githubusercontent.com/51b438f6e9d4d88a8250f1de8140ce6dc47d69651779a83a713c2ce66869defe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646d6b2f6d6b7661726e6973682e7376673f6d61784167653d33363030267374796c653d666c61742d737175617265266c6f676f3d636f6d706f736572)](https://packagist.org/packages/dmk/mkvarnish)[![Total Downloads](https://camo.githubusercontent.com/062157be3de756cc967eb0caaee8bf5de1cc138b048be32bcd1bc3b332003211/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646d6b2f6d6b7661726e6973682e7376673f6d61784167653d33363030267374796c653d666c61742d737175617265)](https://packagist.org/packages/dmk/mkvarnish)[![Build Status](https://camo.githubusercontent.com/185a194bb96b663d9a119418c4cc27da9d3fff47d2f74a028a733258e6aebd95/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f444d4b45425553494e455353474d42482f6d6b7661726e6973682f5048502d43492e7376673f6d61784167653d33363030267374796c653d666c61742d737175617265266c6f676f3d6769746875622d616374696f6e73)](https://github.com/DMKEBUSINESSGMBH/mkvarnish/actions?query=workflow%3APHP-CI)[![License](https://camo.githubusercontent.com/17fbd12f838999dcfdcafe6e01333c81c76e52901a8ef13c612dd97ae0449a6a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646d6b2f6d6b7661726e6973682e7376673f6d61784167653d33363030267374796c653d666c61742d737175617265266c6f676f3d676e75)](https://packagist.org/packages/dmk/mkvarnish)

> Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. A high level overview of what Varnish does can be read on [varnish-cache.org](http://varnish-cache.org/)

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

[](#introduction)

### What does it do?

[](#what-does-it-do)

This extension tells Varnish about TYPO3 insights of a page to allow Varnish make proper caching decisions based on those information. It informs Varnish to invalidate the cache as soon as the content is changed through the TYPO3 backend.

### Features

[](#features)

- ready to use configration for Varnish and TYPO3
- Varnish based caching for all pages using cache-tags
- TYPO3 clear cache hook to clear cache or smart ban relevant pages in Varnish
- Provide a page content error handler which does not bypass Varnish like the dafault handler does. This way 404 handling leverages Varnish too.

### Background

[](#background)

- the extension sets `config.sendCacheHeaders = 1`to enable TYPO3 core function which sends appropriate cache headers to Varnish
- send "X-Cache-Tags" HTTP Header which is used to issue PURGE command against
- send appropriate PURGE Command to Varnish during a TYPO3 clearCache action
- those headers are used for Varnish processing only and get removed afterwards

Installation
------------

[](#installation)

We recommend the installation via composer. Maybe you can use our [TYPO3-Composer-Webroot Project](https://github.com/DMKEBUSINESSGMBH/typo3-composer-webroot)

From project root you need to run

```
composer require dmk/mkvarnish
```

### Requirements

[](#requirements)

- you should make yourself familiar with Varnish and how you want to implement Varnish in your specific setup.
- Varnish has to be up and running. You can find a sample configuration in `EXT:mkvarnish/Configuration/Varnish/default-4.vcl`. Make sure to change or remove the Debug ID at the beginning of sub vcl\_recv. Furthermore you should check the last comment in sub vcl\_recv and act accordingly.
- requests to all static files should send appropriate expires headers

### Configuration

[](#configuration)

- set `$TYPO3_CONF_VARS['SYS']['reverseProxyIP']` to the IP address which is used by Varnish to connect to your Webserver or enable the caching in the extension configuration by set `sendCacheHeaders` to `Force Enabled`.
- do not use sessions, the fe\_typo\_user cookie will disable the caching
- dont set `no_cache=1`
- the use of \*\_INT objects will disable the cache too, dont use it (You can find them with the Admin Panel.)
- Configure the page content error handler in the site configuration like this instead of the default "Page" handler if your 404 page is cachable through Varnish. Otherwise the content won't be cached/delivered through Varnish: ```
    errorHandling:
      -
        errorHandler: PHP
        errorPhpClassFQCN: DMK\Mkvarnish\Error\PageErrorHandler\PageContentErrorHandler
        errorCode: '404'
        errorContentSource: 't3://page?uid=123'
    ```

### USER\_INT objects

[](#user_int-objects)

Sometimes there is a page that should be cached through Varnish but contains USER\_INT plugins, for example a news detail page with a comment plugin. To migrate such a plugin to a USER plugin might be a hassle or even impossible. But there is a easy solution: The plugin needs to be lazy loaded with Ajax. To achieve this you can use the Ajax Content Renderer feature of [mktools](https://github.com/DMKEBUSINESSGMBH/typo3-mktools/blob/master/Documentation/Utilities/AjaxContentRenderer/Index.md).

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance62

Regular maintenance activity

Popularity29

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~90 days

Recently: every ~70 days

Total

34

Last Release

120d ago

Major Versions

v10.0.9 → v11.0.22023-09-08

v10.0.10 → v11.0.32023-09-12

v11.0.4 → v12.0.02024-03-11

11.5.x-dev → v13.0.02025-04-14

v12.0.1 → v13.0.12025-08-12

PHP version history (3 changes)v1.0.0PHP &gt;=5.5

v1.0.9PHP &gt;=5.6

v11.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5131653?v=4)[Michael Wagner](/maintainers/rengaw83)[@rengaw83](https://github.com/rengaw83)

![](https://www.gravatar.com/avatar/b0f42c674d10d07667556ec6a435fd657236977083564418d83df8790cafe0ed?d=identicon)[dmkbot](/maintainers/dmkbot)

---

Top Contributors

[![hannesbochmann](https://avatars.githubusercontent.com/u/6302628?v=4)](https://github.com/hannesbochmann "hannesbochmann (115 commits)")[![rengaw83](https://avatars.githubusercontent.com/u/5131653?v=4)](https://github.com/rengaw83 "rengaw83 (17 commits)")[![dmk-ralf-urban](https://avatars.githubusercontent.com/u/873591?v=4)](https://github.com/dmk-ralf-urban "dmk-ralf-urban (3 commits)")[![IMajaris](https://avatars.githubusercontent.com/u/17573264?v=4)](https://github.com/IMajaris "IMajaris (2 commits)")[![darthnorman](https://avatars.githubusercontent.com/u/628835?v=4)](https://github.com/darthnorman "darthnorman (1 commits)")

---

Tags

cachephptypo3typo3-extensionvarnishcacheextensiontypo3varnish

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dmk-mkvarnish/health.svg)

```
[![Health](https://phpackages.com/badges/dmk-mkvarnish/health.svg)](https://phpackages.com/packages/dmk-mkvarnish)
```

###  Alternatives

[b13/proxycachemanager

TYPO3 Extension that automatically flushes cached URLs within a proxy / CDN.

10100.7k](/packages/b13-proxycachemanager)[bnf/nginx-cache

NGINX Cache Manager for TYPO3

243.7k](/packages/bnf-nginx-cache)

PHPackages © 2026

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