Download the PHP package byjg/cache-engine without Composer
On this page you can find all versions of the php package byjg/cache-engine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download byjg/cache-engine
More information about byjg/cache-engine
Files in byjg/cache-engine
Package cache-engine
Short Description A multi-purpose cache engine PSR-6 and PSR-16 implementation with several drivers.
License MIT
Informations about the package cache-engine
Cache Engine
A multipurpose cache engine PSR-6 and PSR-16 implementation with several drivers.
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:
PSR-16 Getting Started: here
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.
You can use one of the factory methods to create a instance of the CachePool implementation:
PSR-6 Getting Started: here
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\ShmopCachedEngine | uses the shared memory area for cache |
Logging cache commands
You can add a PSR Log compatible to the constructor in order to get Log of the operations
See log examples here
Use a PSR-11 container to retrieve the cache keys
You can use a PSR-11 compatible to retrieve the cache keys.
See more here
Install
Just type:
Running Unit Testes
Note: the parameter --stderr
after phpunit
is to permit run the tests on SessionCacheEngine.
Dependencies
All versions of cache-engine with dependencies
psr/cache Version ^1.0|^2.0|^3.0
psr/log Version ^1.0|^1.1|^2.0
psr/simple-cache Version ^1.0|^2.0
psr/container Version ^1.0|^1.1|^2.0