Download the PHP package wshafer/psr11-phpcache without Composer
On this page you can find all versions of the php package wshafer/psr11-phpcache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wshafer/psr11-phpcache
More information about wshafer/psr11-phpcache
Files in wshafer/psr11-phpcache
Package psr11-phpcache
Short Description PHP-Cache Factories for PSR-11
License BSD-2-Clause
Homepage https://github.com/wshafer/psr11-phpcache
Informations about the package psr11-phpcache
PSR-11 PHP Cache
PHP Cache Factories for PSR-11
Table of Contents
- Installation
- Usage
- Containers
- Pimple
- Zend Service Manager
- Laminas Service Manager
- Frameworks
- Zend Expressive
- Zend Framework 3
- Mezzio
- Slim
- Configuration
- Minimal Configuration
- Example
- Full Configuration
- Example
- Minimal Configuration
- Adapters
- APC
- APCU
- Array
- File System
Memcache- Memcached
- MongoDb
- Predis
- Redis
- Void
- Doctrine
- Chain
Installation
Usage
Additional info can be found in the documentation
Containers
Any PSR-11 container wil work. In order to do that you will need to add configuration and register the factory \WShafer\PSR11PhpCache\PhpCacheFactory()
Below are some specific container examples to get you started
Pimple Example
Zend Service Manager
Laminas Service Manager
Frameworks
Any framework that use a PSR-11 should work fine. Below are some specific framework examples to get you started
Zend Expressive
You'll need to add configuration and register the services you'd like to use. There are number of ways to do that
but the recommended way is to create a new config file config/autoload/cache.global.php
Configuration
config/autoload/cache.global.php
Zend Framework 3
You'll need to add configuration and register the services you'd like to use. There are number of ways to do that
but the recommended way is to create a new config file config/autoload/cache.global.php
Configuration
config/autoload/cache.global.php
Mezzio
You'll need to add configuration and register the services you'd like to use. There are number of ways to do that
but the recommended way is to create a new config file config/autoload/cache.global.php
Configuration
config/autoload/cache.global.php
Module Config
If you're not using the Zend Component Installer you will also need to register the Module.
config/modules.config.php (ZF 3 skeleton)
config/application.config.php (ZF 2 skeleton)
Slim
public/index.php
Configuration
-
Named Services : These are services names wired up to a factory. The configuration will differ based on the type of container / framework in use.
- Adapters : Cache Pool config tell us what type of cache to use and how to connect to that cache. Some caches provide other special options on how to handle the data and what data to handle. See the appropriate apdaptor config below.
Minimal Configuration
A minimal configuration would consist of at least one default cache and one named service. Please note that if you don't specify a default cache a Void pool will be used when you wire up the default cache.
Minimal Example (using Zend Expressive for the example)
Full Configuration (using Zend Expressive for the example)
Full Example
Adapters
APC
This is a PSR-6 cache implementation using Apc. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
_Note: APC extension is not directly supported in PHP 7. You can use the APCBC package on PHP 7 for APCU backwards compatibility, but it is recommended to simply the use the APCu cache below.
Php Cache Docs: Apc PSR-6 Cache pool
APCU
This is a PSR-6 cache implementation using Apcu. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
Php Cache Docs: Apcu PSR-6 Cache pool
Array
This is a PSR-6 cache implementation using PHP array. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
Php Cache Docs: Array PSR-6 Cache pool
File System
This is a PSR-6 cache implementation using Filesystem. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
This implementation is using the excellent Flysystem.
See: PSR-11 FlySystem for some pre-built factories to get up and running quickly
Php Cache Docs: Filesystem PSR-6 Cache pool
Illuminate
This is a PSR-6 cache implementation using Illuminate cache. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
This is a PSR-6 to Illuminate bridge.
Php Cache Docs: Illuminate PSR-6 Cache pool
Memcache
This adaptor is not supported by this package as there is no official release of this driver for PHP 7. Please use the Memcached adaptor instead.
Memcached
This is a PSR-6 cache implementation using Memcached. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
Php Cache Docs: Memcached PSR-6 Cache pool
MongoDb
This is a PSR-6 cache implementation using MongoDB. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
Php Cache Docs: MongoDB PSR-6 Cache pool
Predis
This is a PSR-6 cache implementation using Predis. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
This implementation is using Predis. If you want an adapter with PhpRedis you should look at our Redis adapter.
Note: For more connection options please see the Predis docs.
Php Cache Docs: Predis PSR-6 Cache pool
Redis
This is a PSR-6 cache implementation using Redis. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
This implementation is using PhpRedis. If you want an adapter with Predis you should look at our Predis adapter.
Php Cache Docs: Redis PSR-6 Cache pool
Void
This is a void implementation of a PSR-6 cache. Other names for this adapter could be Blackhole or Null adapter. This adapter does not save anything and will always return an empty CacheItem. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
Php Cache Docs: Void PSR-6 Cache pool
Doctrine
This is a PSR-6 cache implementation using Doctrine cache. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
Php Cache Docs: Doctrine PSR-6 Cache pool
Chain
This is a PSR-6 cache implementation using a chain of other PSR-6 cache pools. It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read the shared documentation at www.php-cache.com.
Php Cache Docs: PSR-6 Cache pool chain