PHPackages                             innoweb/silverstripe-prefix-requirements - 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. innoweb/silverstripe-prefix-requirements

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

innoweb/silverstripe-prefix-requirements
========================================

Adds a file hash prefix to all requirements. Replaces the default ?{mtime} suffix to make the requirements fully cacheable.

4.1.0(7mo ago)21.7k1BSD-3-ClausePHP

Since Mar 29Pushed 7mo ago3 watchersCompare

[ Source](https://github.com/xini/silverstripe-prefix-requirements)[ Packagist](https://packagist.org/packages/innoweb/silverstripe-prefix-requirements)[ Docs](http://github.com/xini/silverstripe-prefix-requirements)[ RSS](/packages/innoweb-silverstripe-prefix-requirements/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (22)Used By (0)

Silverstripe Prefix Requirements
================================

[](#silverstripe-prefix-requirements)

Overview
--------

[](#overview)

Adds a file hash prefix to all requirements. Replaces the default ?{mtime} suffix to make the requirements fully cacheable.

Whenever a CSS or Javascript file is changed, a new prefixed version of the file is generated. This makes the files fully cacheable because whenever a change is made a file with a new URL is included in the HTML.

It is recommended to minify CSS files using Grunt or Gulp (or any other technique you might want to use).

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

[](#requirements)

- Silverstripe CMS 6.x

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

[](#installation)

1. composer require innoweb/silverstripe-prefix-requirements
2. run dev/build

Usage
-----

[](#usage)

The prefixed files are generated and stored in the default `CombinedFilesFolder` of the `Requirements_Backend` class. You can use the following entry in your `config.yml` to specify where the generated files are stored:

```
SilverStripe\View\Requirements_Backend:
  default_combined_files_folder: '_your_folder'
```

Default is `ASSETS_DIR . '/_combinedfiles'`.

This module doesn't handle css and js in the CMS.

Because the files are moved to the configured `CombinedFilesFolder`, please make sure you only use paths relative to the website root for includes in your css and js files. E.g. `/_resources/themes/yourtheme/images/icon.png`, not `../images/icon.png`.

You can exclude certain requirements from being re-written using config:

```
Innoweb\PrefixRequirements\Control\PrefixResourceURLGenerator:
  excluded_resources:
    - 'vendor/lekoala/silverstripe-debugbar/**/*'
    - 'vendor/jonom/silverstripe-betternavigator/**/*'
```

You can also change the format that is used for the hash and switch it to postfix instead of prefix:

```
Innoweb\PrefixRequirements\Control\PrefixResourceURLGenerator:
  nonce_style: [mtime|sha1|md5]
  use_postfix: true
```

License
-------

[](#license)

BSD 3-Clause License, see [License](license.md)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance62

Regular maintenance activity

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~173 days

Recently: every ~229 days

Total

21

Last Release

237d ago

Major Versions

1.x-dev → 2.0.02018-06-28

2.2.1 → 3.0.02023-03-16

2.2.2 → 4.0.02025-09-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d2e71d7787401a7bd4916062346163897f89f455d650ab32b5d60cd14825ad3?d=identicon)[xini](/maintainers/xini)

---

Top Contributors

[![xini](https://avatars.githubusercontent.com/u/1152403?v=4)](https://github.com/xini "xini (18 commits)")[![dizzystuff](https://avatars.githubusercontent.com/u/576903?v=4)](https://github.com/dizzystuff "dizzystuff (6 commits)")

---

Tags

silverstripecachingprefixrequirements

### Embed Badge

![Health badge](/badges/innoweb-silverstripe-prefix-requirements/health.svg)

```
[![Health](https://phpackages.com/badges/innoweb-silverstripe-prefix-requirements/health.svg)](https://phpackages.com/packages/innoweb-silverstripe-prefix-requirements)
```

###  Alternatives

[silverstripe/staticpublishqueue

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

45135.4k4](/packages/silverstripe-staticpublishqueue)[tractorcow/silverstripe-dynamiccache

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

3916.0k2](/packages/tractorcow-silverstripe-dynamiccache)[pstaender/silverstripe-redis-cache

Enables Redis cache for SilverStripe

1199.1k](/packages/pstaender-silverstripe-redis-cache)[silverstripe-terraformers/keys-for-cache

Silverstripe cache key management

1726.6k](/packages/silverstripe-terraformers-keys-for-cache)

PHPackages © 2026

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