PHPackages                             thybag/php-simple-cache - 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. thybag/php-simple-cache

ActiveLibrary[Caching](/categories/caching)

thybag/php-simple-cache
=======================

Quick, talkative file cache helper

07PHP

Since Dec 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/thybag/Php-simple-cache)[ Packagist](https://packagist.org/packages/thybag/php-simple-cache)[ RSS](/packages/thybag-php-simple-cache/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Php simple cache
================

[](#php-simple-cache)

A quick simple PHP file caching library. Not recommended for production use. License: MIT

#### Features:

[](#features)

- Optional ability to bypass cache (for debugging)
- Human readable cache keys/paths
- Fallback to old cache on failure to load new data
- Talkative logging (Requires PSR logger)

Usage
-----

[](#usage)

`composer require thybag/php-simple-cache`

```
// Standard
$cache = new \thybag\PhpSimpleCache\Cache;
$result = $cache->get("key");

// static
$result = \thybag\PhpSimpleCache\StaticCache::get("key")

```

#### Methods

[](#methods)

- **read**($cache\_key, $max\_age, $fallback) - read an item from the cache. Return fallback if item is to old.
- **write**($cache\_key, $data) - write data to cache
- **delete**($cache\_key, $recursivedDelete) - delete item from cache (or entire folder optionally)
- **has**($key, $max\_age) - do we have a no stale version cached
- **age**($cache\_key) - current age of cache item (false if no cache found)
- **get**($cache\_key, $callback, $max\_page) - run a callback, caching contents

Settings can be changed via

- **setLogger**(PSR logger)
- **setOptions**(\['cache\_path'=&gt;, 'allow\_cache\_bypass', 'cache\_bypass\_keyword', 'default\_ttl'\])

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e22d6c955042e97d5c5a68cc21b540dc6aa3fdb7f830d56274e51dbb6c10d13e?d=identicon)[bag](/maintainers/bag)

### Embed Badge

![Health badge](/badges/thybag-php-simple-cache/health.svg)

```
[![Health](https://phpackages.com/badges/thybag-php-simple-cache/health.svg)](https://phpackages.com/packages/thybag-php-simple-cache)
```

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)

PHPackages © 2026

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