Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omega8cc/redis
https://github.com/omega8cc/redis
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/omega8cc/redis
- Owner: omega8cc
- Created: 2012-05-04T18:32:32.000Z (over 12 years ago)
- Default Branch: 8.x-1.x
- Last Pushed: 2024-08-22T05:30:13.000Z (4 months ago)
- Last Synced: 2024-08-22T06:36:07.864Z (4 months ago)
- Language: PHP
- Size: 505 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.PhpRedis.txt
Awesome Lists containing this project
README
PhpRedis cache backend
======================This client, for now, is only able to use the PhpRedis extension.
Get PhpRedis
------------You can download this library at:
https://github.com/phpredis/phpredis
This is a PHP extension, too recent for being packaged in most distribution, you
will probably need to compile it yourself.Default behavior is to connect via tcp://localhost:6379, but you might want to
connect differently.Use the Sentinel high availability mode
---------------------------------------Redis can provide a master/slave mode with sentinels server monitoring them.
More information about setting it : https://redis.io/topics/sentinel.This mode needs the following settings:
Modify the host as follow:
// Sentinels instances list with hostname:port format.
$settings['redis.connection']['host'] = ['1.2.3.4:5000','1.2.3.5:5000','1.2.3.6:5000'];Add the new instance setting:
// Redis instance name.
$settings['redis.connection']['instance'] = 'instance_name';Connect via UNIX socket
-----------------------Just add these lines to your settings.php file:
$settings['redis.connection']['host'] = '/tmp/redis.sock'; // Your Redis socket
$settings['redis.connection']['port'] = 0; // For socket connections the port must be 0Don't forget to change the path depending on your operating system and Redis
server configuration.Connect to a remote host and database
-------------------------------------See README.md file.
For this particular implementation, host settings are overridden by the
UNIX socket parameter.