This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

A simple library to cache assets and html page

0.1.0 2017-01-30 00:57 UTC

This package is auto-updated.

Last update: 2021-05-25 23:09:04 UTC


A small library to cache assets and html pages.

Build status Coverage Status Latest Stable Version License


composer require adrorocker/tinycache


require '../vendor/autoload.php';

use TinyCache\Cache;
use TinyCache\Item;
use TinyCache\Adapter\FilesystemAdapter;

$cache = new Cache(new FilesystemAdapter);

$item1 = new Item('key1','Hola uno');
$item2 = new Item('key2','Hola dos');


// You can 'add' an Item to the cache collection before it is actually saved on the pool

// Then commit to save the items on the pool

// Get an Item from the pool
$item = $cache->getItem('key1');

// Get several Items from the pool
$items = $cache->getItems(['key1','key2']);

// Delete on Item from the pool

// Delete several Items from the pool

// Delete all Items from the pool


Alejandro Morelos.