定制 netlogix/nxvarnish 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

netlogix/nxvarnish

最新稳定版本:6.0.0

Composer 安装命令:

composer require netlogix/nxvarnish

包简介

Adds varnish integration to TYPO3

README 文档

README

stability-stable TYPO3 V13 Minimum PHP Version GitHub CI status

Adds varnish integration to TYPO3. Ensures varnish caches are flushed when TYPO3 caches are flushed. Uses cache tags to flush all necessary content.

Compatibility

The current version (6.x) of this extension has been tested using these versions:

  • TYPO3 13.4 on PHP 8.3
  • TYPO3 13.4 on PHP 8.4

Installation

Install the package via composer.

composer require netlogix/nxvarnish

Configuration

TYPO3

This extension provides some configuration in Install Tool.

  • varnishHost: required, needed to communicate with Varnish in order to purge caches
  • allowCacheLogin: optional, send normal cache headers even when someone is logged in

Varnish

Varnish needs some special configuration to understand cache tags and BAN requests. Add this to your Varnish .vcl:

# WARNING: this is an example how to add tag-based purging to an existing # Varnish configuration. This is *not* a complete configuration! # a list of clients that are allowed to initiate a BAN acl purge { "localhost"; # add whatever IPs are allowed to initiate a BAN "172.16.0.0"/16; # just an example } sub vcl_recv { # ... if (req.method == "BAN") { # only allow cache BANs from known IPs if (!std.ip(req.http.X-Client-Ip, client.ip) ~ purge) { return (synth(405, "Not allowed.")); } # ban using cache tags if (req.http.X-Cache-Tags) { # this will ban all cache objects with matching tags ban("obj.http.X-Cache-Tags ~ " + req.http.X-Cache-Tags); # create an HTTP 200 response and exit return (synth(200, "Ban added.")); } # return an error if no cache tags were provided. # you might need to remove this if you have additional BAN conditions return (synth(400, "Bad Request.")); } # ... } sub vcl_deliver { # ... # remove cache-tags header from response sent to client unset resp.http.X-Cache-Tags; # ... } 

统计信息

  • 总下载量: 29.91k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固