PHPackages                             empiricompany/maho-nocacheheader - 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. empiricompany/maho-nocacheheader

ActiveMaho-module[HTTP &amp; Networking](/categories/http)

empiricompany/maho-nocacheheader
================================

Adds Cache-Control: no-store, no-cache, must-revalidate and Pragma: no-cache headers globally on all frontend pages, restoring OpenMage default behavior. Configurable via admin.

0.1.0(1mo ago)10OSL-3.0PHPPHP &gt;=8.3

Since Jun 6Pushed 1mo agoCompare

[ Source](https://github.com/empiricompany/maho_nocacheheader)[ Packagist](https://packagist.org/packages/empiricompany/maho-nocacheheader)[ RSS](/packages/empiricompany-maho-nocacheheader/feed)WikiDiscussions main Synced 1w ago

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

Maho NoCacheHeader
==================

[](#maho-nocacheheader)

[![Maho Commerce](https://camo.githubusercontent.com/b6b18863bd9be2e126f1d0153283cb2c819a84aaf70031e8b7587a9faedeebcb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61686f5f436f6d6d657263652d6d6f64756c652d6f72616e6765)](https://camo.githubusercontent.com/b6b18863bd9be2e126f1d0153283cb2c819a84aaf70031e8b7587a9faedeebcb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61686f5f436f6d6d657263652d6d6f64756c652d6f72616e6765)[![License](https://camo.githubusercontent.com/bf8fb4e29810a9fc189ac77817d64e700c8cdad65219aec8af767d3413542703/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4f534c2d2d332e302d626c7565)](https://camo.githubusercontent.com/bf8fb4e29810a9fc189ac77817d64e700c8cdad65219aec8af767d3413542703/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4f534c2d2d332e302d626c7565)[![PHP](https://camo.githubusercontent.com/304040cd133992ef00119f16bf25c890678ce0c5b9898eb2b53349394e39707e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e332d383839324246)](https://camo.githubusercontent.com/304040cd133992ef00119f16bf25c890678ce0c5b9898eb2b53349394e39707e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e332d383839324246)[![PHPStan Level](https://camo.githubusercontent.com/ff3c7f8c8667ce643f47e74532748f673482a5f95d7d4269f925f2eebbe5117e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230382d627269676874677265656e)](https://camo.githubusercontent.com/ff3c7f8c8667ce643f47e74532748f673482a5f95d7d4269f925f2eebbe5117e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230382d627269676874677265656e)

A Maho module that sends `Cache-Control: no-store, no-cache, must-revalidate` and `Pragma: no-cache` headers on all frontend pages. Configurable via admin.

When to use this module
-----------------------

[](#when-to-use-this-module)

Maho supports the browser's back-forward cache (bfcache) natively via the `pageshow` JavaScript event (see [PR #991](https://github.com/MahoCommerce/maho/pull/991)). This is the recommended approach: pages are served from bfcache for instant navigation, and the `pageshow` handler refreshes dynamic content (cart sidebar, checkout state) when the page is restored.

This module is intended for **custom or legacy themes** that do not implement the `pageshow` event (or equivalent client-side logic) and need to prevent stale dynamic content by disabling bfcache on the server side via `Cache-Control: no-store`.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- Maho Commerce

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

[](#installation)

```
composer require empiricompany/maho-nocacheheader
```

Clear the cache after installation:

```
./maho cache:flush
```

Configuration
-------------

[](#configuration)

Go to *System → Configuration → Web → Cache-Control Header* and set *Add Cache-Control: no-store, no-cache, must-revalidate and Pragma: no-cache headers* to **Yes**.

The setting applies to frontend only — admin panel is not affected.

Development
-----------

[](#development)

This module ships with the standard Maho CI gates:

- **PHPStan** (level 8) — `vendor/bin/phpstan analyze`
- **Rector** (dry-run) — `vendor/bin/rector -c .rector.php --dry-run`
- **PHP CS Fixer** (dry-run) — `vendor/bin/php-cs-fixer fix --dry-run`
- **PHP / XML syntax checks** — automatic on CI

Run `composer install` and you can execute any of the above locally before pushing.

License
-------

[](#license)

OSL-3.0 / AFL-3.0

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5071467?v=4)[Tony](/maintainers/empiricompany)[@empiricompany](https://github.com/empiricompany)

---

Top Contributors

[![empiricompany](https://avatars.githubusercontent.com/u/5071467?v=4)](https://github.com/empiricompany "empiricompany (10 commits)")

---

Tags

bfcachecache-controlmaho-modulephp

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/empiricompany-maho-nocacheheader/health.svg)

```
[![Health](https://phpackages.com/badges/empiricompany-maho-nocacheheader/health.svg)](https://phpackages.com/packages/empiricompany-maho-nocacheheader)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25026.1M82](/packages/php-http-cache-plugin)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k122](/packages/httpsoft-http-message)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)[swoft/websocket-server

swoft websocket server component

16135.7k5](/packages/swoft-websocket-server)[thesis/nats

Async (fiber based) client for Nats.

754.4k](/packages/thesis-nats)[jasny/http-signature

Implementation of the IETF HTTP Signatures draft RFC

10104.7k](/packages/jasny-http-signature)

PHPackages © 2026

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