You are browsing a version that has not yet been released. |
Caching
DoctrineModule provides some pre-configured caches using Laminas\Cache, which can be utilized by either Doctrine ORM or Doctrine ODM.
The following caches are available by default:
In-Memory
Provided by laminas/laminas-cache-storage-adapter-memory
, you can pull this cache from
the container under the key doctrine.cache.array
. It does not really do any caching and
suits merely as a proof of concept or for cases, where you do not want to have caching.
Filesystem
Provided by laminas/laminas-cache-storage-adapter-filesystem
, you can pull this cache from
the container under the key doctrine.cache.filesystem
. To override the location for the
cache storage folder, use the following configuration:
APCu
This cache requires the additional package laminas/laminas-cache-storage-adapter-apcu
, which
is not installed by default.
You can pull the cache from the container using the key doctrine.cache.apcu
. To pass additional
arguments for configuration, use the following config:
Memcached
This cache requires the additional package laminas/laminas-cache-storage-adapter-memcached
, which
is not installed by default.
You can pull the cache from the container using the key doctrine.cache.memcached
. To pass additional
arguments for configuration, use the following config:
Redis
This cache requires the additional package laminas/laminas-cache-storage-adapter-redis
, which
is not installed by default.
You can pull the cache from the container using the key doctrine.cache.redis
. The default config
will access a Redis server at localhost, port 6379. To pass additional arguments for configuration,
or to change the default config, use the following config: