Skip to content

Latest commit

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

TinyCache

Modern cache adapter for PHP Projects.

  • PHP ^7.0 Syntax
  • PSR-4
  • PSR-16
  • Factory and Adapter Pattern
  • Exception

Supported Framework

This library is PSR-4 comply. You can use it on every framework that support composer.

  • CodeIgniter 3/4
  • Laravel
  • Yii
  • Your framework?
  • Native PHP

Supported Drivers

  • Redis
  • Memcached
  • File
  • MongoDB

Next plan : ApacheIgnite

Installation

composer require gemblue/tiny-cache

Usage

useGemblue\TinyCache\CacheFactory;
$cacheFactory = newCacheFactory;
$cache = $cacheFactory->getInstance([
'driver' => 'Memcached',
'host' => 'localhost',
'post' => 11211,
'persistence' => true
]);

For full example, browse example folder.

API

MethodDesc
setSet a key
getGet a key
deleteDelete a key
clearWipe all key
hasCheck key existance
setMultipleSet multiple key
getMultipleGet multiple key
deleteMultipleDelete multiple key

Delete by Prefix

To delete caches with any prefix, just call like this:

$cache->delete('prefix_*');

Developed By

  • @gemblue
  • @yllumi

About

Simple Cache Adapter for PHP Projects, PSR-16 Comply

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages