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

AbandonedArchivedLibrary[Caching](/categories/caching)

wruczek/php-file-cache
======================

Light, simple and standalone PHP in-file caching class

0.0.5(6y ago)4226.6k↑50%10[2 issues](https://github.com/Wruczek/PHP-File-Cache/issues)1MITPHPPHP &gt;=5.4.0

Since Nov 26Pushed 1y ago6 watchersCompare

[ Source](https://github.com/Wruczek/PHP-File-Cache)[ Packagist](https://packagist.org/packages/wruczek/php-file-cache)[ RSS](/packages/wruczek-php-file-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (1)

Deprecation notice
==================

[](#deprecation-notice)

This project is not in active development. Issues remain with cache files sometimes being saved with invalid data and unable to be read (see: [issue #3](https://github.com/Wruczek/PHP-File-Cache/issues/3) and [\#4](https://github.com/Wruczek/PHP-File-Cache/issues/4)). The API is confusing and a rewrite would be necessary (for example renaming "retrive" function to "get", "store" to "set" etc.).

A community fork has been created, with authors planning on continuing the devlopment.

### Check out a maintaned community fork:

[](#check-out-a-maintaned-community-fork-httpsgithubcomflightphpphp-file-cache)

PHP-File-Cache [![Latest Stable Version](https://camo.githubusercontent.com/77aa8bf24eed7daaf26b7f0465f8a42dc362db7cabcf252448de13819dc66930/68747470733a2f2f706f7365722e707567782e6f72672f777275637a656b2f7068702d66696c652d63616368652f76657273696f6e)](https://packagist.org/packages/wruczek/php-file-cache) [![Latest Unstable Version](https://camo.githubusercontent.com/3f8140c51f77e687f4f595b192c7f4f796b712e6322278d39b32559b31a01277/68747470733a2f2f706f7365722e707567782e6f72672f777275637a656b2f7068702d66696c652d63616368652f762f756e737461626c65)](//packagist.org/packages/wruczek/php-file-cache) [![License](https://camo.githubusercontent.com/35aec06e5d4c946d06eeb0624a399b910273e9f80e91ac327554d0f5dc20ba28/68747470733a2f2f706f7365722e707567782e6f72672f777275637a656b2f7068702d66696c652d63616368652f6c6963656e7365)](https://packagist.org/packages/wruczek/php-file-cache)
========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#php-file-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 5.4.0 - 7.1+
- Free under a MIT license

### Requirements and Installation

[](#requirements-and-installation)

You need PHP 5.4.0+ for usage and PHP 5.6+ for development (PHPUnit)

Require with composer:
`composer require wruczek/php-file-cache`

### Usage

[](#usage)

```
