neos / cache
Neos Cache Framework
Fund package maintenance!
shop.neos.io/neosfunding
Requires
- php: ^8.2
- neos/utility-files: 9.0.0-beta16
- neos/utility-opcodecache: 9.0.0-beta16
- neos/utility-pdo: 9.0.0-beta16
- psr/cache: ^2.0 || ^3.0
- psr/log: ^2.0 || ^3.0
- psr/simple-cache: ^2.0 || ^3.0
Requires (Dev)
- mikey179/vfsstream: ^1.6.10
- phpunit/phpunit: ~9.1
Suggests
- ext-igbinary: The igbinary extension is a replacement for the standard PHP serializer
- ext-memcache: If you have a memcache server and want to use it for caching.
- ext-memcached: Alternative, if you have a memcache server and want to use it for caching.
- ext-redis: If you have a redis server and want to use it for caching.
Provides
- psr/cache-implementation: 2.0.0 || 3.0.0
- psr/simple-cache-implementation: 2.0.0 || 3.0.0
- 9.0.x-dev
- 9.0.0-beta16
- 9.0.0-beta15
- 9.0.0-beta14
- 9.0.0-beta11
- 9.0.0-beta10
- 9.0.0-beta8
- 9.0.0-beta4
- 9.0.0-beta3
- 9.0.0-beta2
- 9.0.0-beta1
- 8.4.x-dev
- 8.3.x-dev
- 8.3.12
- 8.3.11
- 8.3.10
- 8.3.9
- 8.3.8
- 8.3.7
- 8.3.6
- 8.3.5
- 8.3.4
- 8.3.3
- 8.3.2
- 8.3.1
- 8.3.0
- 8.2.x-dev
- 8.2.10
- 8.2.9
- 8.2.8
- 8.2.7
- 8.2.6
- 8.2.5
- 8.2.4
- 8.2.3
- 8.2.2
- 8.2.1
- 8.2.0
- 8.1.x-dev
- 8.1.13
- 8.1.12
- 8.1.11
- 8.1.10
- 8.1.9
- 8.1.8
- 8.1.7
- 8.1.6
- 8.1.5
- 8.1.4
- 8.1.3
- 8.1.2
- 8.1.1
- 8.1.0
- 8.0.x-dev
- 8.0.16
- 8.0.15
- 8.0.14
- 8.0.13
- 8.0.12
- 8.0.11
- 8.0.10
- 8.0.9
- 8.0.8
- 8.0.7
- 8.0.6
- 8.0.5
- 8.0.4
- 8.0.3
- 8.0.2
- 8.0.1
- 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.3.22
- 4.3.21
- 4.3.20
- 4.3.19
- 4.3.18
- 4.3.17
- 4.3.16
- 4.3.15
- 4.3.14
- 4.3.13
- 4.3.12
- 4.3.11
- 4.3.10
- 4.3.9
- 4.3.8
- 4.3.7
- 4.3.6
- 4.3.5
- 4.3.4
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.x-dev
- 4.2.15
- 4.2.14
- 4.2.13
- 4.2.12
- 4.2.11
- 4.2.10
- 4.2.9
- 4.2.8
- 4.2.7
- 4.2.6
- 4.2.5
- 4.2.4
- 4.2.3
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.x-dev
- 4.1.19
- 4.1.18
- 4.1.17
- 4.1.16
- 4.1.15
- 4.1.14
- 4.1.13
- 4.1.12
- 4.1.11
- 4.1.10
- 4.1.9
- 4.1.8
- 4.1.7
- 4.1.6
- 4.1.5
- 4.1.4
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.x-dev
- 4.0.25
- 4.0.24
- 4.0.23
- 4.0.22
- 4.0.21
- 4.0.20
- 4.0.19
- 4.0.18
- 4.0.17
- 4.0.16
- 4.0.15
- 4.0.14
- 4.0.13
- 4.0.12
- 4.0.11
- 4.0.10
- 4.0.9
- 4.0.8
- 4.0.7
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
This package is auto-updated.
Last update: 2024-11-19 13:34:08 UTC
README
This is a generic cache package for use in projects. It implements PSR-6 and PSR-16 but also brings own interfaces used in Flow and Neos which support additional featuers.
Note
This repository is a read-only subsplit of a package that is part of the
Flow framework (learn more on http://flow.neos.io <http://flow.neos.io/>
_).
All pull requests and issues should be opened in the main repository.
The package is usable without the Flow framework, but if you
want to use it, please have a look at the Flow documentation <http://flowframework.readthedocs.org/en/stable/>
_
Installation
Install latest version via composer:
composer require neos/cache
Basic usage
$environmentConfiguration = new \Neos\Cache\EnvironmentConfiguration('appIdentifier', __DIR__);
// This cache factory can be used for PSR-6 caches
// and for the Neos CacheInterface
$cacheFactory = new \Neos\Cache\Psr\Cache\CacheFactory(
$environmentConfiguration
);
// Create a PSR-6 compatible cache
$cachePool = $cacheFactory->create(
'myCache',
\Neos\Cache\Backend\SimpleFileBackend::class
);
// Create a PSR-16 compatible cache
$simpleCacheFactory = new \Neos\Cache\Psr\SimpleCache\SimpleCacheFactory(
$environmentConfiguration
);
$simpleCache = $simpleCacheFactory->create(
'myCache',
\Neos\Cache\Backend\SimpleFileBackend::class
);
The first argument given to either factory is a unique identifier for the specific cache instance. If you need different caches you should give them separate identifiers.
Documentation
Both the PSR-6 CachePool and the PSR-16 SimpleCache are separate implementations with their respective factories,
but both use the existing backends
that can also be used with the \Neos\Cache\Frontend\FrontendInterface
implementations, which are slightly
different than the PSR caches but also implement additional features like tagging.
Note
Both PSR implementations are not integrated in Flow yet, so when you use them within a Flow installation
it's your responsibility to flush them correctly as ./flow flow:cache:flush
will not do that in this case.
Contribute
If you want to contribute to this package or the Flow framework, please have a look at https://github.com/neos/flow-development-collection - it is the repository used for development and all pull requests should go into it.