PHPackages                             secra/caching-proxy - 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. secra/caching-proxy

ActiveLibrary[Caching](/categories/caching)

secra/caching-proxy
===================

Converts a bunch of .css/.js files to one minified file and precompress them with gzip. Rewrite all relative path of ressources in css files.

v1.0.0(3y ago)017[8 issues](https://github.com/sebkrueger/CachingProxy/issues)MITPHPPHP &gt;=7.2

Since Feb 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sebkrueger/CachingProxy)[ Packagist](https://packagist.org/packages/secra/caching-proxy)[ RSS](/packages/secra-caching-proxy/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (7)Dependencies (3)Versions (9)Used By (0)

CachingProxy
============

[](#cachingproxy)

[![Scrutinizer Quality Score](https://camo.githubusercontent.com/a945b5269d7873c33c4a349343101614eb417191603de75d85f1fc86c72ce4d0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7365626b7275656765722f43616368696e6750726f78792f6261646765732f7175616c6974792d73636f72652e706e673f733d36653837393235306237623338653661653535613766353533643733616537323037623162333662)](https://scrutinizer-ci.com/g/sebkrueger/CachingProxy/)[![Code Coverage](https://camo.githubusercontent.com/51ed26d375dd844d10d31fc13b76de57b6d06239bfac5dd142071b112bc45ea4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7365626b7275656765722f43616368696e6750726f78792f6261646765732f636f7665726167652e706e673f733d62336331396261663362383134613265343638303464306461643233653762303037633033346139)](https://scrutinizer-ci.com/g/sebkrueger/CachingProxy/)

Caching Proxy Class

The CachingProxy include css and js files in other php scripts and build a path to the files, with an timestamp of the last modification in it.

Main features are
-----------------

[](#main-features-are)

- detect last version of .css and .js Source files
- detect .min version of .css and .js files
- combine all .css and .js files to one cached file
- auto create gzip version of cached file
- depend on mod rewrite and browser, deliver precompressed files
- debugmode for development and native, unmodified inclusion of files

Usage
-----

[](#usage)

For .css files use the following code in the head of your webpage. The usage for .js should be obvious.

```
// set the path to you webserver document root most of the time $_SERVER["DOCUMENT_ROOT"]
// and in 2. parameter the path, were you would like to store your cached files absolut from document root
$css_cache = new \secra\CachingProxy\CssCachingProxy($_SERVER["DOCUMENT_ROOT"], "/path/to/css/cache");

// Add some files
$css_cache->addFile("/path/to/file1.css");
$css_cache->addFile("/path/to/file2.css");

// Do the packing work and print the html into the head
echo $css_cache->getIncludeHtml();

```

Demo page
---------

[](#demo-page)

The /demo folder contain a sample webpage with the CSS and Javascript.

Changelog
---------

[](#changelog)

\###Version 1.0 (04. Jan 2021)

- Upgrade PHP Version
- Switch to docker for local demo

\###Version 0.2 (18. July 2014)

- Rewrite relative path of ressources in css files

\###Version 0.1 (16. February 2014)

- Add Composer Support
- PSR-4 compatible
- EditorConfig Support
- Add Licence Text
- Add usage example in readme

Developer notes
---------------

[](#developer-notes)

See Developer\_Info.md under folder vagarnt-vm

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Every ~543 days

Recently: every ~784 days

Total

7

Last Release

1215d ago

Major Versions

v0.2.3 → v1.0.02023-01-19

PHP version history (2 changes)v0.1.0PHP &gt;=5.3.3

v1.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d9169a1986b33e16eac414d552dd0d99cdb5695c0afd6618fdcb1836869a9d0?d=identicon)[sebkrueger](/maintainers/sebkrueger)

---

Top Contributors

[![sebkrueger](https://avatars.githubusercontent.com/u/1439494?v=4)](https://github.com/sebkrueger "sebkrueger (58 commits)")

---

Tags

cssJSzipminifycachingcompresscombinepackinggzippackpackerprecompress

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/secra-caching-proxy/health.svg)

```
[![Health](https://phpackages.com/badges/secra-caching-proxy/health.svg)](https://phpackages.com/packages/secra-caching-proxy)
```

###  Alternatives

[matthiasmullie/minify

CSS &amp; JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.

2.0k30.5M336](/packages/matthiasmullie-minify)[tubalmartin/cssmin

A PHP port of the YUI CSS compressor

23241.0M53](/packages/tubalmartin-cssmin)[stolz/assets

An ultra-simple-to-use assets management library

296519.2k8](/packages/stolz-assets)[lajax/yii2-asset-minifier

Runtime minification and combination of asset files.

1010.4k](/packages/lajax-yii2-asset-minifier)[sensiolabs/minify-bundle

Assets Minifier (CSS, JS) for Symfony &amp; Minify integration in Asset Mapper

5694.9k1](/packages/sensiolabs-minify-bundle)[rmrevin/yii2-minify-view

Yii2 View component with auto minification css &amp; js in runtime

194302.3k7](/packages/rmrevin-yii2-minify-view)

PHPackages © 2026

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