PHP Cache Management Library
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

O2System Cache

O2System Cache is an Open Source Cache Management Adapters Library. This allows the O2System Framework to integrate with some of the most popular cache storage engines. All but file-based caching require specific server requirements, and a Fatal Exception will be thrown if server requirements are not met. O2System Cache is build for working more powerful within O2System Framework, but also can be used for integrated with others as standalone version with limited features.

O2System Cache is written based on PSR-6: Caching Interface and PSR-16: Common Interface for Caching Libraries.

Supported Storage Engines Adapters

Engine 5.6+ 7.0+  
APC Yes No
APCu Yes Yes
File Yes Yes
Memcache Yes Yes
Memcached Yes Yes
Redis Yes Yes
Wincache Yes Yes
XCache Yes No
Zend OPCache Yes Yes

Composer Installation

The best way to install O2System Cache is to use Composer

composer require o2system/cache



use O2System\Cache;

$cache = new Cache\Adapters\Opcache\ItemPool();

if( $cache->isConnected() ) {
    // Save cache
    $cache->save( new Cache\Item( 'cacheKeyName', 'This is cache content, support any type of data', 300 ) );
    // Get cache
    echo $cache->getItem( 'cacheKeyName' )->get();

Output: This is cache content, support any type of data

Documentation is available on this repository wiki or visit this repository github page.

Ideas and Suggestions

Please kindly mail us at

Bugs and Issues

Please kindly submit your issues at Github so we can track all the issues along development and send a pull request to this repository.

System Requirements


Role Name
Founder and Lead Projects Steeven Andrian Salim
Documentation Steeven Andrian Salim
Github Pages Designer Teguh Rianto

Supported By