PHPackages                             cajogos/php-temp-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. cajogos/php-temp-cache

ActiveLibrary[Caching](/categories/caching)

cajogos/php-temp-cache
======================

Simple PHP caching system that uses a tmp folder in a Linux environment.

v1.1(9y ago)62.8k↓40.5%1MITPHPPHP &gt;=5.3.0

Since Dec 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/cajogos/php-temp-cache)[ Packagist](https://packagist.org/packages/cajogos/php-temp-cache)[ Docs](https://github.com/cajogos/php-temp-cache)[ RSS](/packages/cajogos-php-temp-cache/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)DependenciesVersions (4)Used By (1)

TempCache [![Latest Stable Version](https://camo.githubusercontent.com/72b7759301899276ce15efbf0ead2ef77f24be63097a55d78f784e0d9d001f11/68747470733a2f2f706f7365722e707567782e6f72672f63616a6f676f732f7068702d74656d702d63616368652f762f737461626c65)](https://packagist.org/packages/cajogos/php-temp-cache) [![License](https://camo.githubusercontent.com/06aaaba1841b1c21654935f5dfe1b876fb2d007b92dc61e7e4eb3b060418e424/68747470733a2f2f706f7365722e707567782e6f72672f63616a6f676f732f7068702d74656d702d63616368652f6c6963656e7365)](https://packagist.org/packages/cajogos/php-temp-cache) [![Monthly Downloads](https://camo.githubusercontent.com/e42a0e78fb55eadfddb6181bd9df23bd16d08e6cbd756ce0c3a77a41fe3884df/68747470733a2f2f706f7365722e707567782e6f72672f63616a6f676f732f7068702d74656d702d63616368652f642f6d6f6e74686c79)](https://packagist.org/packages/cajogos/php-temp-cache)
===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#tempcache---)

A simple PHP caching class that uses the temporary files (`/tmp/`) folder of a Linux distribution.

Main caching library of [Biscuit Link](https://biscuit.link) framework.

Simple to Use
-------------

[](#simple-to-use)

The class has been written to be dead easy to use and should be familiar to anyone who has used any caching before. However, beware that the main aim of this cache is **not to be the fastest caching mechanism out there**, but to simplify the lives of those who just want to have a simple caching system in place to avoid hitting API limits, although from my experience it is pretty fast!

### Storing (put)

[](#storing-put)

```
// $expire is time in seconds for validity.

TempCache::put($key, $value, $expire);
```

### Retrieving (get)

[](#retrieving-get)

```
TempCache::get($key);
```

### Deleting (remove)

[](#deleting-remove)

```
TempCache::remove($key);
```

Features
--------

[](#features)

- No need to install extra plugins or PHP modules.
- Works out of the box. (As long as your web server user has enough privileges).
- Avoid hitting those API limits set by other websites.

Getting Started
---------------

[](#getting-started)

**Warning**: You need PHP &gt;= 5.3 to use TempCache.

### Using Composer

[](#using-composer)

```
{
	"require": {
		"cajogos/php-temp-cache": "1.1"
	}
}
```

### Download and use

[](#download-and-use)

The class is **self-contained** so you can use it in any project you already have by using:

```
require_once 'classes/TempCache.php';

use Cajogos\TempCache as TempCache;
```

Contributors
------------

[](#contributors)

- [Carlos Ferreira](https://github.com/cajogos)

Want to help contribute or thank me? Get in touch via .

*You are awesome!*

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

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 ~51 days

Total

3

Last Release

3379d ago

### Community

Maintainers

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

---

Top Contributors

[![cajogos](https://avatars.githubusercontent.com/u/433657?v=4)](https://github.com/cajogos "cajogos (12 commits)")

---

Tags

cachinghacktoberfestlibrarylinuxpackagistphpphp-cachecachecachingtemp

### Embed Badge

![Health badge](/badges/cajogos-php-temp-cache/health.svg)

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

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k772.9M2.7k](/packages/psr-simple-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

445131.2M46](/packages/react-cache)[tedivm/stash

The place to keep your cache.

9614.9M128](/packages/tedivm-stash)[spatie/blink

Cache that expires in the blink of an eye

1675.6M11](/packages/spatie-blink)[gregwar/cache

A lightweight file-system cache system

1124.6M23](/packages/gregwar-cache)[putyourlightson/craft-blitz

Intelligent static page caching for creating lightning-fast sites.

155484.7k37](/packages/putyourlightson-craft-blitz)

PHPackages © 2026

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