Easy to use, auto configurable, extensible cache provider

1.0.11 2017-11-19 22:25 UTC

This package is auto-updated.

Last update: 2021-10-01 00:16:24 UTC


Easy to use, auto configurable, extensible cache provider

Latest Stable Version License



Quick Install

composer require maslosoft/cache

######Easy to use, auto configurable, extensible cache provider

If you need some modern cache with just basic features here it is.

It implements only basic cache operations:

  • has - to check if has key in cache
  • get - to get cached value by key
  • set - to set value to cache
  • remove - to remove cached value
  • clear - to clear entira cache


  • PHP 5.6+
  • composer


Use composer to install extension:

composer require maslosoft/cache:"*"

Setup cache. After calling init any further instance will be configured same as below $cache.

use Maslosoft\Cache\Cache;

$cache = new Cache();
// Setup something here...
$cache->timeout = 1244;

Basic Usage


use Maslosoft\Cache\Cache;

$cache = new Cache();

// Init configuration, now it is available anywhere
// By default it will try some cache providers and select best available.

$key = 1;

	$cache->set($key, 'Some value');

echo $cache->get($key);

And that's it!