PHPackages                             jameslevi/nest - 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. jameslevi/nest

ActiveLibrary[Caching](/categories/caching)

jameslevi/nest
==============

Is a simple file-based PHP caching library.

v1.0.2(5y ago)071MITPHPPHP &gt;=5.3.0

Since May 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jameslevi/nest)[ Packagist](https://packagist.org/packages/jameslevi/nest)[ RSS](/packages/jameslevi-nest/feed)WikiDiscussions main Synced 3d ago

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

Nest
====

[](#nest)

[![](https://camo.githubusercontent.com/368360a8bbc62bb2285a60244528a382f13ea32c7d4bfaf4a49a243f17261426/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76312e302e322d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f3d2533434c4f474f5f4e414d45253345266c6f676f436f6c6f723d776869746526636f6c6f723d326262633861)](https://camo.githubusercontent.com/368360a8bbc62bb2285a60244528a382f13ea32c7d4bfaf4a49a243f17261426/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76312e302e322d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f3d2533434c4f474f5f4e414d45253345266c6f676f436f6c6f723d776869746526636f6c6f723d326262633861) [![](https://camo.githubusercontent.com/b4344b50cc4d00bc34f5209dfc527e7180da7c06507ab149bddbe79d0313e021/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f3d2533434c4f474f5f4e414d45253345266c6f676f436f6c6f723d776869746526636f6c6f723d326262633861)](https://camo.githubusercontent.com/b4344b50cc4d00bc34f5209dfc527e7180da7c06507ab149bddbe79d0313e021/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f3d2533434c4f474f5f4e414d45253345266c6f676f436f6c6f723d776869746526636f6c6f723d326262633861)

Is a simple file-based PHP caching library.

Features
--------

[](#features)

1. Uses PHP's opcache to cache static data.
2. Create multiple cache databases.
3. Easy integration with any PHP framework or use with no framework at all.

Installation
------------

[](#installation)

1. You can install via composer.

```
composer require jameslevi/nest

```

2. If not using any framework, paste the following code to load the autoloader in your project.

```
require_once __DIR__.'/vendor/autoload.php';
```

3. Import nest into your project.

```
use Graphite\Component\Nest\Nest;
```

4. Set the default storage path for your project.

```
Nest::setStoragePath(__DIR__."/storage/cache");
```

5. Set the default hash algorithm to use. The default algorithm is "md5".

```
Nest::setHashAlgorithm("md5");
```

Basic Example
-------------

[](#basic-example)

Let us try a simple caching for database configuration.

```
