PHPackages                             nguyenanhung/php-file-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. nguyenanhung/php-file-cache

ActiveLibrary[Caching](/categories/caching)

nguyenanhung/php-file-cache
===========================

Light, simple and standalone PHP in-file caching class

v1.0.3(1y ago)07.0k1GPL-3.0PHPPHP &gt;=5.4

Since Aug 29Pushed 1y ago2 watchersCompare

[ Source](https://github.com/nguyenanhung/PHP-File-Cache)[ Packagist](https://packagist.org/packages/nguyenanhung/php-file-cache)[ Docs](https://github.com/nguyenanhung/PHP-File-Cache)[ RSS](/packages/nguyenanhung-php-file-cache/feed)WikiDiscussions main Synced 2w ago

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

PHP File Cache
==============

[](#php-file-cache)

[![Latest Stable Version](https://camo.githubusercontent.com/39049a2cc8982cac9cf0d41717e156a6c727871b7fc4f3c672bd913aa4c3fd38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e677579656e616e68756e672f7068702d66696c652d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nguyenanhung/php-file-cache)[![Total Downloads](https://camo.githubusercontent.com/3a41a4b7d69e920f21dce0d083a4a1acf20f80492206e40c5580c33f14046182/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e677579656e616e68756e672f7068702d66696c652d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nguyenanhung/php-file-cache)[![Daily Downloads](https://camo.githubusercontent.com/a56ff97dd08c990882be018a60d969add3ceb9267d36e7a14294294f61594744/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64642f6e677579656e616e68756e672f7068702d66696c652d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nguyenanhung/php-file-cache)[![Monthly Downloads](https://camo.githubusercontent.com/b0ddf348bf1763d645ae6e8626b8d169d7c27a73f4f0987beccc2233479d6b6d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e677579656e616e68756e672f7068702d66696c652d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nguyenanhung/php-file-cache)[![License](https://camo.githubusercontent.com/dd847d70e0d8073af64d90a2325aa89904bb3737bf9a66a168d66d9f77116269/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e677579656e616e68756e672f7068702d66696c652d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nguyenanhung/php-file-cache)[![PHP Version Require](https://camo.githubusercontent.com/63474716b24b4f8cf246007cebfcd1c34b1cc61dc71f352bee2e1d0f066fb8fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6e677579656e616e68756e672f7068702d66696c652d63616368652f706870)](https://packagist.org/packages/nguyenanhung/php-file-cache)

Light, simple and standalone PHP in-file caching class

This library is fork code from `https://github.com/Wruczek/PHP-File-Cache` as refactoring someone!

### 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
- Supports PHP 5.4 - 8.0
- Free under a GPL-3.0 license

### Requirements and Installation

[](#requirements-and-installation)

You need PHP 5.4+ for usage

Require with composer:

`composer require nguyenanhung/php-file-cache`

### Usage

[](#usage)

```
