Skip to content

Commit

Permalink
Merge branch 'feature/zendframework#1370-redis-cache-storage-adapter-…
Browse files Browse the repository at this point in the history
…docs'

Close zendframework#1370
  • Loading branch information
Ocramius committed Nov 5, 2014
2 parents 8836066 + 3a76333 commit b46c19a
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions docs/languages/en/modules/zend.cache.storage.adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,75 @@ The Memcached Adapter
| | | |Please read this<http://php.net/manual/memcached.setoption.php> for more information |
+--------------------+----------------------+-------------------------+------------------------------------------------------------------------------------------------------+

.. _zend.cache.storage.adapter.redis:

The Redis Adapter
---------------------

The ``Zend\Cache\Storage\Adapter\Redis`` adapter stores cache
items over the redis protocol. It's using the required PHP extension
redis_.

This adapter implements the following interfaces:

- ``Zend\Cache\Storage\FlushableInterface``
- ``Zend\Cache\Storage\TotalSpaceCapableInterface``

.. _zend.cache.storage.adapter.redis.capabilities:

.. table:: Capabilities

+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|Capability |Value |
+====================+=================================================================================================================================================+
|supportedDatatypes | ``string``, ``array`` (serialized), ``object`` (serialized) |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|supportedMetadata |<none> |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|minTtl |1 |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|maxTtl |0 |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|staticTtl |``true`` |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|ttlPrecision |1 |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|useRequestTime |``false`` |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|expiredRead |``false`` |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|maxKeyLength |255 |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|namespaceIsPrefix |``true`` |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|namespaceSeparator |<none> |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+

.. _zend.cache.storage.adapter.redis.options:

.. table:: Adapter specific options

+--------------------+----------------------+-------------------------+--------------------------------------------------------------------------------------+
|Name |Data Type |Default Value |Description |
+====================+======================+=========================+======================================================================================+
|database |``integer`` |0 |Set database identifier |
+--------------------+----------------------+-------------------------+--------------------------------------------------------------------------------------+
|lib_option |``array`` |``[]`` | Associative array of redis options were the array key is the option name |
+--------------------+----------------------+-------------------------+--------------------------------------------------------------------------------------+
|namespace_separator |``string`` |":" |A separator for the namespace and prefix |
+--------------------+----------------------+-------------------------+--------------------------------------------------------------------------------------+
|password |``string`` |"" |Set password |
+--------------------+----------------------+-------------------------+--------------------------------------------------------------------------------------+
|persistent_id |``string`` |```` |Set persistant id (``RDB``, ``AOF``) |
+--------------------+----------------------+-------------------------+--------------------------------------------------------------------------------------+
|resource_manager |``string`` |```` |Set the redis resource manager to use |
+--------------------+----------------------+-------------------------+--------------------------------------------------------------------------------------+
|servers | | | Server can be described as follows: |
| | | | - URI: /path/to/sock.sock |
| | | | - Assoc: array('host' => <host>[, 'port' => <port>[, 'timeout' => <timeout>]]) |
| | | | - List: array(<host>[, <port>, [, <timeout>]]) |
+--------------------+----------------------+-------------------------+--------------------------------------------------------------------------------------+

.. _zend.cache.storage.adapter.memory:

The Memory Adapter
Expand Down Expand Up @@ -1058,6 +1127,7 @@ Examples
.. _dba: http://php.net/manual/book.dba.php
.. _dba_open: http://php.net/manual/function.dba-open.php
.. _memcached: http://pecl.php.net/package/memcached
.. _redis: https://github.com/nicolasff/phpredis
.. _Libmemcached: http://libmemcached.org/
.. _WinCache: http://pecl.php.net/package/WinCache
.. _XCache: http://xcache.lighttpd.net/
Expand Down

0 comments on commit b46c19a

Please sign in to comment.