You are here

README.Predis.txt in Redis 7.2

Same filename and directory in other branches
  1. 8 README.Predis.txt
  2. 7.3 README.Predis.txt
  3. 7 README.Predis.txt
Predis cache backend
====================

This client, for now, is only able to use the Predis PHP library.

The Predis library requires PHP 5.3 minimum. If your hosted environment does
not ships with at least PHP 5.3, please do not use this cache backend.

Please consider using an OPCode cache such as APC. Predis is a good and fully
featured API, the cost is that the code is a lot more than a single file in
opposition to some other backends such as the APC one.

Get Predis
----------

You can download this library at:

  https://github.com/nrk/predis

This file explains how to install the Predis library and the Drupal cache
backend. If you are an advanced Drupal integrator, please consider the fact
that you can easily change all the pathes. Pathes used in this file are
likely to be default for non advanced users.

Download and install library
----------------------------

Once done, you either have to clone it into:

  sites/all/libraries/predis

So that you have the following directory tree:

  sites/all/libraries/predis/src/ # Where the PHP code stands

Or, any other place in order to share it:
For example, into your libraries folder, in order to get:

  some/dir/predis/src

If you choose this solution, you have to alter a bit your $conf array into
the settings.php file as this:

  define('PREDIS_BASE_PATH', DRUPAL_ROOT . '/some/dir/predis/src/');

Connect to a remote host and database
-------------------------------------

See README.txt file.

Advanced configuration (PHP expert)
-----------------------------------

Best solution is, whatever is the place where you put the Predis library, that
you set up a fully working autoloader able to use it. The one being used by the
Redis module is a default fallback and will naturally being appened to the SPL
autoloader stack.

File

README.Predis.txt
View source
  1. Predis cache backend
  2. ====================
  3. This client, for now, is only able to use the Predis PHP library.
  4. The Predis library requires PHP 5.3 minimum. If your hosted environment does
  5. not ships with at least PHP 5.3, please do not use this cache backend.
  6. Please consider using an OPCode cache such as APC. Predis is a good and fully
  7. featured API, the cost is that the code is a lot more than a single file in
  8. opposition to some other backends such as the APC one.
  9. Get Predis
  10. ----------
  11. You can download this library at:
  12. https://github.com/nrk/predis
  13. This file explains how to install the Predis library and the Drupal cache
  14. backend. If you are an advanced Drupal integrator, please consider the fact
  15. that you can easily change all the pathes. Pathes used in this file are
  16. likely to be default for non advanced users.
  17. Download and install library
  18. ----------------------------
  19. Once done, you either have to clone it into:
  20. sites/all/libraries/predis
  21. So that you have the following directory tree:
  22. sites/all/libraries/predis/src/ # Where the PHP code stands
  23. Or, any other place in order to share it:
  24. For example, into your libraries folder, in order to get:
  25. some/dir/predis/src
  26. If you choose this solution, you have to alter a bit your $conf array into
  27. the settings.php file as this:
  28. define('PREDIS_BASE_PATH', DRUPAL_ROOT . '/some/dir/predis/src/');
  29. Connect to a remote host and database
  30. -------------------------------------
  31. See README.txt file.
  32. Advanced configuration (PHP expert)
  33. -----------------------------------
  34. Best solution is, whatever is the place where you put the Predis library, that
  35. you set up a fully working autoloader able to use it. The one being used by the
  36. Redis module is a default fallback and will naturally being appened to the SPL
  37. autoloader stack.