Download the PHP package validus/cache without Composer
On this page you can find all versions of the php package validus/cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download validus/cache
More information about validus/cache
Files in validus/cache
Package cache
Short Description Provides cache for your Expressive project.
License MIT
Homepage https://github.com/ValidusPHP/cache
Informations about the package cache
Validus Cache
Provides caching implementations for zend expressive projects.
PSR-6 and PSR-16 Cache factories for PSR-11 with Zend configuration provider.
Installation
The easiest way to install this package is through composer:
Configuration
A complete example configuration can be found in example/full-config.php. Please note that the values in there are the defaults, and don't have to be supplied when you are not changing them. Keep your own configuration as minimal as possible. A minimal configuration can be found in example/simple-config.php
If your application uses the zend-component-installer Composer plugin, your configuration is complete; the shipped Validus\Cache\ConfigProvider
registers the cache service.
Accessing the cache adapter
you can access the cache implementation via the container :
Middleware
Validus cache package comes with a CacheResetMiddleware
, allowing you to reset the cache pool to its initial status after every request.
you can add the middleware to your config/pipeline.php
file like this :
a factory for the middleware is already provided in the config provider so you don't have to worry about that as long as you are using zend-component-installer composer plugin.
All versions of cache with dependencies
psr/cache Version ^1.0
psr/container Version ^1.0
psr/http-server-middleware Version ^1.0
psr/simple-cache Version ^1.0
symfony/cache Version ^4.1