2017 © Pedro Peláez
 

library cache-engine

A multi-purpose cache engine PSR-6 and PSR-16 implementation with several drivers.

image

byjg/cache-engine

A multi-purpose cache engine PSR-6 and PSR-16 implementation with several drivers.

  • Monday, April 9, 2018
  • by byjg
  • Repository
  • 2 Watchers
  • 2 Stars
  • 12,200 Installations
  • PHP
  • 7 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 14 % Grown

The README.md

Cache Engine

Build Status Opensource ByJG GitHub source GitHub license GitHub release, (*1)

A multipurpose cache engine PSR-6 and PSR-16 implementation with several drivers., (*2)

PSR-16

PSR-16 defines a Simple Cache interface with less verbosity than PSR-6. Below a list of engines available in this library that is PSR-16 compliant:, (*3)

PSR-16 Getting Started: here, (*4)

PSR-6

The PSR-6 implementation use the engines defined above. PSR-6 is more verbosity and have an extra layer do get and set the cache values., (*5)

You can use one of the factory methods to create a instance of the CachePool implementation:, (*6)

PSR-6 Getting Started: here, (*7)

List of Cache Engines

Class Description
\ByJG\Cache\Psr16\NoCacheEngine Do nothing. Use it for disable the cache without change your code
\ByJG\Cache\Psr16\ArrayCacheEngine Local cache only using array. It does not persists between requests
\ByJG\AnyDataset\NoSql\Cache\KeyValueCacheEngine Use S3-Like or ClouflareKV as a store for the cache (other repository)
\ByJG\Cache\Psr16\FileSystemCacheEngine Save the cache result in the local file system
\ByJG\Cache\Psr16\MemcachedEngine Uses the Memcached as the cache engine
\ByJG\Cache\Psr16\TmpfsCacheEngine Uses the Tmpfs as the cache engine
\ByJG\Cache\Psr16\RedisCachedEngine uses the Redis as cache
\ByJG\Cache\Psr16\SessionCachedEngine uses the PHP session as cache
\ByJG\Cache\Psr16\ShmopCacheEngine (deprecated) uses the shared memory area for cache. Use TmpfsCacheEngine.

Logging cache commands

You can add a PSR Log compatible to the constructor in order to get Log of the operations, (*8)

See log examples here, (*9)

Use a PSR-11 container to retrieve the cache keys

You can use a PSR-11 compatible to retrieve the cache keys., (*10)

See more here, (*11)

Beyond the PSR protocol

The PSR protocol is a good way to standardize the cache access, but sometimes you need to go beyond the protocol., (*12)

Some cache engines have additional features that are not covered by the PSR protocol., (*13)

Some examples are: - Atomic Operations - Garbage Collection, (*14)

Install

Just type:, (*15)

composer require "byjg/cache-engine"

Running Unit Testes

vendor/bin/phpunit --stderr

Note: the parameter --stderr after phpunit is to permit run the tests on SessionCacheEngine., (*16)

Dependencies

flowchart TD
    byjg/cache-engine --> psr/cache
    byjg/cache-engine --> psr/log
    byjg/cache-engine --> psr/simple-cache
    byjg/cache-engine --> psr/container

Open source ByJG, (*17)

The Versions

09/04 2018

dev-master

9999999-dev

A multi-purpose cache engine PSR-6 and PSR-16 implementation with several drivers.

  Sources   Download

MIT

The Requires

 

The Development Requires

by João Gilberto Magalhães

09/04 2018

4.0.3

4.0.3.0

A multi-purpose cache engine PSR-6 and PSR-16 implementation with several drivers.

  Sources   Download

MIT

The Requires

 

The Development Requires

by João Gilberto Magalhães

11/03 2018

4.0.2

4.0.2.0

A multi-purpose cache engine PSR-6 and PSR-16 implementation with several drivers.

  Sources   Download

MIT

The Requires

 

The Development Requires

by João Gilberto Magalhães

31/12 2017

4.0.1

4.0.1.0

A multi-purpose cache engine PSR-6 and PSR-16 implementation with several drivers.

  Sources   Download

MIT

The Requires

 

The Development Requires

by João Gilberto Magalhães

27/05 2017

4.0.0

4.0.0.0

A multi-purpose cache engine PSR-6 and PSR-16 implementation with several drivers.

  Sources   Download

MIT

The Requires

 

by João Gilberto Magalhães

14/02 2017

3.0.0

3.0.0.0

A multi-purpose cache engine in PHP with several drivers. PSR-6 compliant.

  Sources   Download

MIT

The Requires

 

by João Gilberto Magalhães

10/08 2016

2.0.0

2.0.0.0

A multi-purpose cache engine in PHP with several drivers. PSR-6 compliant.

  Sources   Download

MIT

The Requires

 

by João Gilberto Magalhães

10/08 2016

dev-pre-2.0

dev-pre-2.0

A multi-purpose cache engine in PHP with several drivers. PSR-6 compliant.

  Sources   Download

MIT

The Requires

 

by João Gilberto Magalhães

18/11 2015

1.0.4

1.0.4.0

A multi-purpose cache engine in PHP.

  Sources   Download

MIT

The Requires

 

by João Gilberto Magalhães

12/09 2015

1.0.3

1.0.3.0

A multi-purpose cache engine in PHP.

  Sources   Download

MIT

The Requires

 

by João Gilberto Magalhães

10/09 2015

1.0.2

1.0.2.0

A multi-purpose cache engine in PHP.

  Sources   Download

MIT

The Requires

 

by João Gilberto Magalhães

31/08 2015

1.0.1

1.0.1.0

A multi-purpose cache engine in PHP.

  Sources   Download

MIT

The Requires

 

by João Gilberto Magalhães

21/07 2015

1.0.0

1.0.0.0

A multi-purpose cache engine in PHP.

  Sources   Download

MIT

The Requires

 

by João Gilberto Magalhães