2017 © Pedro Peláez
 

library cheesecache

A request scoped cache library for PHP with the goal to make caching consistent and maintainable.

image

cheese44/cheesecache

A request scoped cache library for PHP with the goal to make caching consistent and maintainable.

  • Tuesday, September 20, 2016
  • by cheese44
  • Repository
  • 1 Watchers
  • 3 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

cheeseCache

Software License Build Status Coverage Status, (*1)

A request scoped cache library for PHP with the goal to make caching consistent and maintainable., (*2)

Best used for caching function and query results that are called multiple times during a request and are unlikely to change, (*3)

Installation

Package is available on Packagist, you can install it using Composer., (*4)

composer require cheese44/cheesecache

Usage


use cheeseCache\app; class Test { /** * cheeseCache does all the work for you * * you don't have to clutter your code with checking, setting and reading the cache yourself */ public function cacheSum($a, $b) { $cache = cheeseCache\app\cacheProvider::getCache(); $sum = $cache->cache( array($a, $b), function() use($a, $b) { return $a + $b; }); return $sum; } /** * of course cheeseCache still gives you the possibility to manually access these functionalities */ public function cacheSum_Explicit($a, $b) { $cache = cheeseCache\app\cacheProvider::getCache(); if($cache->isCacheSet(array($a, $b))): return $cache->geCacheValue(array($a, $b)); endif; $sum = $a + $b; $cache->cache( array($a, $b), $sum ); return $sum; } }

The Versions

20/09 2016

dev-master

9999999-dev

A request scoped cache library for PHP with the goal to make caching consistent and maintainable.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

cache caching request scope request scoped

20/09 2016

dev-develop

dev-develop

A request scoped cache library for PHP with the goal to make caching consistent and maintainable.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

cache caching request scope request scoped

23/07 2016

v0.8-stable

0.8.0.0

A request scoped cache library for PHP with the goal to make caching consistent and maintainable.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

cache caching request scope request scoped

23/07 2016

v0.5-alpha

0.5.0.0-alpha

A request scoped cache library for PHP with the goal to make caching consistent and maintainable.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

cache caching request scope request scoped