2017 © Pedro Peláez
 

library psr6-profilecachepool

A PSR-6 compatible cache pool for profiling cache access, hits and misses.

image

corollarium/psr6-profilecachepool

A PSR-6 compatible cache pool for profiling cache access, hits and misses.

  • Friday, October 21, 2016
  • by brunobg
  • Repository
  • 4 Watchers
  • 10 Stars
  • 760 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 3 % Grown

The README.md

PSR6-ProfileCachePool

A PSR6 compatible cache pool for profiling cache access, hits and misses. Developed by Corollarium., (*1)

Composer

composer require corollarium/psr6-profilecachepool, (*2)

How to use it

$pool = new \Cache\Wrapper\ProfileCachePool(new MyRealAdapterPool());

// use normally
$pool->getItem('foo');

// print cute statistics in the end
$pool->reportHTML();

You get something like:, (*3)

Cache Profile Summary: accessed=>100 / missed=>39 / deleted=>12 / cleaned=>0 / saved=>15 /

Aggregating results

Using multiple cache adapters? It's easy to get the aggregated results., (*4)

$pool1 = new \Cache\Wrapper\ProfileCachePool(new MyRealAdapterPool());
$pool2 = new \Cache\Wrapper\ProfileCachePool(new MyOtherAdapterPool());

// use normally
$pool1->getItem('foo');
$pool2->getItem('bar');

// merge statistics from several pools together
$mergedStatistics = \Cache\Wrapper\ProfileCachePool::mergeProfileSummaries([$pool1, $pool2]);

// print cute statistics in the end
\Cache\Wrapper\ProfileCachePool::summaryHTML($mergedStatistics);

The Versions

21/10 2016

dev-master

9999999-dev https://github.com/Corollarium/PSR6-ProfileCachePool/

A PSR-6 compatible cache pool for profiling cache access, hits and misses.

  Sources   Download

MIT

The Requires

 

The Development Requires

profile cache psr-6

27/09 2016

v1.0.3

1.0.3.0 https://github.com/Corollarium/PSR6-ProfileCachePool/

A PSR-6 compatible cache pool for profiling cache access, hits and misses.

  Sources   Download

MIT

The Requires

 

The Development Requires

profile cache psr-6

27/09 2016

v1.0.2

1.0.2.0 https://github.com/Corollarium/PSR6-ProfileCachePool/

A PSR-6 compatible cache pool for profiling cache access, hits and misses.

  Sources   Download

MIT

The Requires

 

The Development Requires

profile cache psr-6

26/09 2016

v1.0.1

1.0.1.0 https://github.com/Corollarium/PSR6-ProfileCachePool/

A PSR-6 compatible cache pool for profiling cache access, hits and misses.

  Sources   Download

MIT

The Requires

 

The Development Requires

profile cache psr-6

26/09 2016

v1.0.0

1.0.0.0 https://github.com/Corollarium/PSR6-ProfileCachePool/

A PSR-6 compatible cache pool for profiling cache access, hits and misses.

  Sources   Download

MIT

The Requires

 

The Development Requires

profile cache psr-6