PHPackages                             nswdpc/silverstripe-cache-headers - 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. nswdpc/silverstripe-cache-headers

ActiveSilverstripe-vendormodule[Caching](/categories/caching)

nswdpc/silverstripe-cache-headers
=================================

Modify cache headers via configuration

v1.0.1(1y ago)26.1k↑207.1%[2 PRs](https://github.com/nswdpc/silverstripe-cache-headers/pulls)2BSD-3-ClausePHP

Since Jan 15Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/nswdpc/silverstripe-cache-headers)[ Packagist](https://packagist.org/packages/nswdpc/silverstripe-cache-headers)[ RSS](/packages/nswdpc-silverstripe-cache-headers/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (2)

Cache header support for Silverstripe
=====================================

[](#cache-header-support-for-silverstripe)

The default Silverstripe cache handling sends headers that are not considered cacheable by a proxy such as Cloudflare.

This module allows you to modify this behaviour via configuration, allowing a proxy to cache based on the headers sent by the application.

Useful information
------------------

[](#useful-information)

- [HTTP cache headers in Silverstripe](https://docs.silverstripe.org/en/4/developer_guides/performance/http_cache_headers/)
- [MDN Cache-Control reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control)

Usage
-----

[](#usage)

- Install this extension using composer
- Modify the configuration rules to your requirements
- Test behind your caching proxy to verify Cache-Control and related header values are as expected

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

[](#installation)

Install via composer:

```
composer require nswdpc/silverstripe-cache-headers
```

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

[](#documentation)

The priority of caching directives in Silverstripe [are in this order as follows](https://docs.silverstripe.org/en/4/developer_guides/performance/http_cache_headers/#priority):

```
disableCache($force=true)
privateCache($force=true)
publicCache($force=true)
enableCache($force=true)
disableCache()
privateCache()
publicCache()
enableCache()

```

By default this module enables the cache (enableCache), but does not provide the force parameter as `true`.

See [documentation](./docs/en/001_index.md) for a primer on various options, including sample configurations.

License
-------

[](#license)

[BSD-3-Clause](./LICENSE.md)

Maintainers
-----------

[](#maintainers)

- [dpcdigital@NSWDPC:~$](https://dpc.nsw.gov.au)

Bugtracker
----------

[](#bugtracker)

We welcome bug reports, pull requests and feature requests on the Github Issue tracker for this project.

Please review the [code of conduct](./code-of-conduct.md) prior to opening a new issue.

Security
--------

[](#security)

If you have found a security issue with this module, please email digital\[@\]dpc.nsw.gov.au in the first instance, detailing your findings.

Development and contribution
----------------------------

[](#development-and-contribution)

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.

Please review the [code of conduct](./code-of-conduct.md) prior to completing a pull request.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~152 days

Recently: every ~192 days

Total

11

Last Release

474d ago

Major Versions

v0.2.1 → v1.0.0-rc12023-06-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/1caefd99092b4a43254e48c40347224f671032ec1ffc3a457e06a7e9ab6e7c02?d=identicon)[nswdpc](/maintainers/nswdpc)

---

Top Contributors

[![JamesDPC](https://avatars.githubusercontent.com/u/69664712?v=4)](https://github.com/JamesDPC "JamesDPC (35 commits)")[![tardinha](https://avatars.githubusercontent.com/u/457209?v=4)](https://github.com/tardinha "tardinha (5 commits)")

---

Tags

cachecloudflareheadershttpsilverstripesilverstripecachingcache-controlcloudflare

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nswdpc-silverstripe-cache-headers/health.svg)

```
[![Health](https://phpackages.com/badges/nswdpc-silverstripe-cache-headers/health.svg)](https://phpackages.com/packages/nswdpc-silverstripe-cache-headers)
```

###  Alternatives

[silverstripe/staticpublishqueue

Static publishing queue to create static versions of pages for enhanced performance and security

44140.1k6](/packages/silverstripe-staticpublishqueue)[tractorcow/silverstripe-dynamiccache

FORK OF Silverstripe module for simple on the fly caching of dynamic content

3816.0k2](/packages/tractorcow-silverstripe-dynamiccache)[steadlane/silverstripe-cloudflare

This module aims to relieve the stress of using Cloudflare caching with any SilverStripe project. Adds extension hooks that clears Cloudflare's cache for a specific page when that page is published or unpublished.

233.7k](/packages/steadlane-silverstripe-cloudflare)

PHPackages © 2026

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