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

ActiveLibrary[Caching](/categories/caching)

jakercz/cache
=============

A lightweight file-system cache system

v1.0.13(5y ago)0381MITPHPPHP &gt;=7.4

Since Oct 6Pushed 5y agoCompare

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

READMEChangelog (1)DependenciesVersions (15)Used By (1)

Cache
=====

[](#cache)

[![Build status](https://camo.githubusercontent.com/02309931907da7f4cc181140f25cc44fb85628fd49a3bbec1a207ca2b5d07813/68747470733a2f2f7472617669732d63692e636f6d2f6a414b4572435a2f43616368652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/02309931907da7f4cc181140f25cc44fb85628fd49a3bbec1a207ca2b5d07813/68747470733a2f2f7472617669732d63692e636f6d2f6a414b4572435a2f43616368652e7376673f6272616e63683d6d6173746572)

This is a lightweight cache system based on file and directories.

Usage
=====

[](#usage)

Step 1: Install it
------------------

[](#step-1-install-it)

Via composer:

```
composer require jakercz/cache
```

Or with a clone of the repository:

```
git clone git@github.com:jAKErCZ/Cache.git
```

Step 2: Setup the rights
------------------------

[](#step-2-setup-the-rights)

You need your PHP script to have access to the cache directory, you can for instance create a `cache` directory (be sure the web server can write it):

```
mkdir cache

```

Step 3: Access the cache
------------------------

[](#step-3-access-the-cache)

To access the cache, you can do like this:

```
