11PHP Cache Dashboard
22===================
33
4- A dashboard for multiple caches in PHP
4+ A dashboard for multiple caches in PHP with support for
55[ PHP Opcache] ( http://php.net/manual/en/intro.opcache.php ) ,
6- [ APCu] ( http://php.net/manual/en/intro.apcu.php ) and
7- [ realpath] ( http://php.net/manual/en/function.realpath-cache-get.php )
6+ [ APCu] ( http://php.net/manual/en/intro.apcu.php ) ,
7+ [ realpath] ( http://php.net/manual/en/function.realpath-cache-get.php ) and
8+ [ Redis] ( https://pecl.php.net/package/redis )
89
910Try it out at the [ demo page] ( https://je-php-cache-dashboard-demo.herokuapp.com/ ) .
1011
1112## Prerequisites
1213
13- - PHP
14+ - PHP 5.3+
1415
1516and one or more of the supported caches
1617
1718 - PHP OpCache (opcache extension for php5, included by default in php5.5+)
1819 - APC or APCu extension
1920 - Realpath cache ( available since PHP 5.3.2+ )
2021 - Memcache (partially) and Memcached extension
22+ - Redis
2123
2224## Supported operations
2325
@@ -28,7 +30,7 @@ and one or more of the supported caches
2830 - Selecting all keys
2931 - Deleting keys without regular expressions
3032 - Sort on any data column
31- - View APCu entry contents
33+ - View entry contents
3234
3335## Usage
3436
@@ -37,7 +39,7 @@ Navigate to the page using your browser and you will receive cache information.
3739
3840![ Screenshot of php-cache-dashboard] ( http://jorgen.evens.eu/github/php-cache-dashboard.png )
3941
40- ## Disabling caches
42+ ## Configuring caches
4143
4244Information about specific caches can be disabled by setting the ` ENABLE_<cache> ` key to false.
4345The default code tests whether the specific cache is available and supported before enabling it.
@@ -75,6 +77,27 @@ define('ENABLE_REALPATH', true);
7577define('ENABLE_REALPATH', false);
7678```
7779
80+ ### Redis
81+
82+ ``` php
83+ <?php
84+ // Enable Redis
85+ define('ENABLE_REDIS', true);
86+
87+ // Disable Redis
88+ define('ENABLE_REDIS', false);
89+ ```
90+
91+ Redis configuration can be done by either changing the ` REDIS_ ` constants or by setting the environment variables with the same name.
92+
93+ | Environment Variable | Default | Description |
94+ | --- | --- | --- |
95+ | REDIS\_ HOST | ` 127.0.0.1 ` | The hostname of the redis instance to connect to |
96+ | REDIS\_ PORT | ` 6379 ` | The TCP port number on which Redis is listening for connections |
97+ | REDIS\_ PASSWORD | ` null ` | The password used to connect |
98+ | REDIS\_ DATABASE | ` null ` | Set this to the database number if you want to lock the database number |
99+ | REDIS\_ SIZE | ` null ` | The size of your Redis database in bytes if total size is detected incorrectly |
100+
78101## Contributing
79102
80103I really appreciate any contribution you would like to make, so don't hesitate to report an issue or submit pull requests.
0 commit comments