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

ActiveLibrary[Caching](/categories/caching)

district5/cache-lib
===================

Cache lib is a caching library for PHP

2.0.0(2y ago)0113↓100%MITPHPPHP &gt;=8.1

Since Feb 18Pushed 2y agoCompare

[ Source](https://github.com/district-5/cache-lib)[ Packagist](https://packagist.org/packages/district5/cache-lib)[ Docs](https://github.com/district-5/cache-lib)[ RSS](/packages/district5-cache-lib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

District5 - CacheLib
====================

[](#district5---cachelib)

CacheLib is a flexible caching library for PHP.

Using Composer
--------------

[](#using-composer)

Example Composer file contents:

```
composer require district5/cache-lib

```

Testing
-------

[](#testing)

Tests against adapters will only occur if the extension is loaded (for example APC/Memcache/Memcached).

`$ composer install`

`$ ./vendor/bin/phpunit`

Quick Start
-----------

[](#quick-start)

CacheLib exposes the following methods for Caching:

- `APC` / `APCU` - The
- `Memcache`
- `Memcached`
- `FileSystem`

To find out more about how to use the adapters, see the `tests/CacheLibTests/Adapters` directory.

In addition to this, there is a `AdapterNull` which you can use for test (or development) purposes.

APC Adapter
-----------

[](#apc-adapter)

The APC adapter will either use `apc` or `apcu` depending on availability.

```
