PHPackages                             flightphp/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. flightphp/cache

ActiveLibrary[Caching](/categories/caching)

flightphp/cache
===============

Light, simple and standalone PHP in-file caching class

v1.1.0(10mo ago)101.5k1[1 PRs](https://github.com/flightphp/cache/pulls)2MITPHPPHP &gt;=7.4

Since Feb 21Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/flightphp/cache)[ Packagist](https://packagist.org/packages/flightphp/cache)[ RSS](/packages/flightphp-cache/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (2)

Cache [![Latest Stable Version](https://camo.githubusercontent.com/5fc9dbe41cd60c38ca6d2aabc4ba4081ddb526006d2f9d38fa1ed5c9a2b8128a/68747470733a2f2f706f7365722e707567782e6f72672f666c696768747068702f63616368652f76657273696f6e)](https://packagist.org/packages/flightphp/cache) [![License](https://camo.githubusercontent.com/7f023f4f1b8a868f2e19b26ac7633a6f5e16d3b43c096445086dde52aa36f4b5/68747470733a2f2f706f7365722e707567782e6f72672f666c696768747068702f63616368652f6c6963656e7365)](https://packagist.org/packages/flightphp/cache)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#cache--)

Light, simple and standalone PHP in-file caching class

### Advantages

[](#advantages)

- Light, standalone and simple
- All code in one file - no pointless drivers.
- Secure - every generated cache file have a php header with `die`, making direct access impossible even if someone knows the path and your server is not configured properly
- Well documented and tested
- Handles concurrency correctly via flock
- Supports PHP 7.4+
- Free under a MIT license

### Requirements and Installation

[](#requirements-and-installation)

You need PHP 7.4+ for usage

Require with composer:

```
composer require flightphp/cache
```

### Usage

[](#usage)

```
