PHPackages                             xmadmax/xcache - 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. xmadmax/xcache

ActiveGit[Caching](/categories/caching)

xmadmax/xcache
==============

XCache, a multi purpose cache

3.0.5007(7y ago)0154MITPHPPHP &gt;=5.4.0

Since Dec 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/XXPerez/XCache)[ Packagist](https://packagist.org/packages/xmadmax/xcache)[ RSS](/packages/xmadmax-xcache/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)DependenciesVersions (16)Used By (0)

XCache
======

[](#xcache)

XCache allows to cache everything, html, json, views, objects, results from a Class-&gt;method, also can put a Cache-Control headers to be used for CDN's or proxies. v.3.0.5007

Three methods allowed:

- As a trait, with inheritance of all methods and automatic method cache.
- As a trait, using XCache methods within same class.
- Independent, using XCache as a separate class.

XCache comes with this drivers:

- Files
- Memcache
- Memcached
- MongoDB
- Apc
- Redis

New: Added XCACHE\_BASEID to allow separated cache on same source code
----------------------------------------------------------------------

[](#new-added-xcache_baseid-to-allow-separated-cache-on-same-source-code)

Install
-------

[](#install)

### Composer

[](#composer)

Edit your base composer.json, and add:

```
{
    "require": {
        "xmadmax/xcache": "3.*"
    }
}
```

Update composer:

```
$ composer update
```

Now, you can include XCache with composer autoload in any of your php files:

```
