Showing
4 changed files
with
74 additions
and
18 deletions
| ... | @@ -12,7 +12,8 @@ | ... | @@ -12,7 +12,8 @@ |
| 12 | "barryvdh/laravel-ide-helper": "^2.1", | 12 | "barryvdh/laravel-ide-helper": "^2.1", |
| 13 | "barryvdh/laravel-debugbar": "^2.0", | 13 | "barryvdh/laravel-debugbar": "^2.0", |
| 14 | "league/flysystem-aws-s3-v3": "^1.0", | 14 | "league/flysystem-aws-s3-v3": "^1.0", |
| 15 | - "barryvdh/laravel-dompdf": "0.6.*" | 15 | + "barryvdh/laravel-dompdf": "0.6.*", |
| 16 | + "predis/predis": "^1.0" | ||
| 16 | }, | 17 | }, |
| 17 | "require-dev": { | 18 | "require-dev": { |
| 18 | "fzaninotto/faker": "~1.4", | 19 | "fzaninotto/faker": "~1.4", | ... | ... |
| ... | @@ -4,8 +4,8 @@ | ... | @@ -4,8 +4,8 @@ |
| 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", |
| 5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
| 6 | ], | 6 | ], |
| 7 | - "hash": "523e654de96df9259fa5dfcb583d6e3e", | 7 | + "hash": "eb7c71e9ed116d3fd2a1d0af07f9f134", |
| 8 | - "content-hash": "74b5601c253aab71cf55e0885f31ae7f", | 8 | + "content-hash": "17d2d7fc5fed682f2a290d6588538035", |
| 9 | "packages": [ | 9 | "packages": [ |
| 10 | { | 10 | { |
| 11 | "name": "aws/aws-sdk-php", | 11 | "name": "aws/aws-sdk-php", |
| ... | @@ -1760,6 +1760,56 @@ | ... | @@ -1760,6 +1760,56 @@ |
| 1760 | "time": "2015-02-03 12:10:50" | 1760 | "time": "2015-02-03 12:10:50" |
| 1761 | }, | 1761 | }, |
| 1762 | { | 1762 | { |
| 1763 | + "name": "predis/predis", | ||
| 1764 | + "version": "v1.0.3", | ||
| 1765 | + "source": { | ||
| 1766 | + "type": "git", | ||
| 1767 | + "url": "https://github.com/nrk/predis.git", | ||
| 1768 | + "reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04" | ||
| 1769 | + }, | ||
| 1770 | + "dist": { | ||
| 1771 | + "type": "zip", | ||
| 1772 | + "url": "https://api.github.com/repos/nrk/predis/zipball/84060b9034d756b4d79641667d7f9efe1aeb8e04", | ||
| 1773 | + "reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04", | ||
| 1774 | + "shasum": "" | ||
| 1775 | + }, | ||
| 1776 | + "require": { | ||
| 1777 | + "php": ">=5.3.2" | ||
| 1778 | + }, | ||
| 1779 | + "require-dev": { | ||
| 1780 | + "phpunit/phpunit": "~4.0" | ||
| 1781 | + }, | ||
| 1782 | + "suggest": { | ||
| 1783 | + "ext-curl": "Allows access to Webdis when paired with phpiredis", | ||
| 1784 | + "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" | ||
| 1785 | + }, | ||
| 1786 | + "type": "library", | ||
| 1787 | + "autoload": { | ||
| 1788 | + "psr-4": { | ||
| 1789 | + "Predis\\": "src/" | ||
| 1790 | + } | ||
| 1791 | + }, | ||
| 1792 | + "notification-url": "https://packagist.org/downloads/", | ||
| 1793 | + "license": [ | ||
| 1794 | + "MIT" | ||
| 1795 | + ], | ||
| 1796 | + "authors": [ | ||
| 1797 | + { | ||
| 1798 | + "name": "Daniele Alessandri", | ||
| 1799 | + "email": "suppakilla@gmail.com", | ||
| 1800 | + "homepage": "http://clorophilla.net" | ||
| 1801 | + } | ||
| 1802 | + ], | ||
| 1803 | + "description": "Flexible and feature-complete PHP client library for Redis", | ||
| 1804 | + "homepage": "http://github.com/nrk/predis", | ||
| 1805 | + "keywords": [ | ||
| 1806 | + "nosql", | ||
| 1807 | + "predis", | ||
| 1808 | + "redis" | ||
| 1809 | + ], | ||
| 1810 | + "time": "2015-07-30 18:34:15" | ||
| 1811 | + }, | ||
| 1812 | + { | ||
| 1763 | "name": "psr/http-message", | 1813 | "name": "psr/http-message", |
| 1764 | "version": "1.0", | 1814 | "version": "1.0", |
| 1765 | "source": { | 1815 | "source": { | ... | ... |
| ... | @@ -6,9 +6,8 @@ if (env('CACHE_DRIVER') === 'memcached') { | ... | @@ -6,9 +6,8 @@ if (env('CACHE_DRIVER') === 'memcached') { |
| 6 | $memcachedServers = explode(',', trim(env('MEMCACHED_SERVERS', '127.0.0.1:11211:100'), ',')); | 6 | $memcachedServers = explode(',', trim(env('MEMCACHED_SERVERS', '127.0.0.1:11211:100'), ',')); |
| 7 | foreach ($memcachedServers as $index => $memcachedServer) { | 7 | foreach ($memcachedServers as $index => $memcachedServer) { |
| 8 | $memcachedServerDetails = explode(':', $memcachedServer); | 8 | $memcachedServerDetails = explode(':', $memcachedServer); |
| 9 | - $components = count($memcachedServerDetails); | 9 | + if (count($memcachedServerDetails) < 2) $memcachedServerDetails[] = '11211'; |
| 10 | - if ($components < 2) $memcachedServerDetails[] = '11211'; | 10 | + if (count($memcachedServerDetails) < 3) $memcachedServerDetails[] = '100'; |
| 11 | - if ($components < 3) $memcachedServerDetails[] = '100'; | ||
| 12 | $memcachedServers[$index] = array_combine($memcachedServerKeys, $memcachedServerDetails); | 11 | $memcachedServers[$index] = array_combine($memcachedServerKeys, $memcachedServerDetails); |
| 13 | } | 12 | } |
| 14 | } | 13 | } |
| ... | @@ -83,6 +82,6 @@ return [ | ... | @@ -83,6 +82,6 @@ return [ |
| 83 | | | 82 | | |
| 84 | */ | 83 | */ |
| 85 | 84 | ||
| 86 | - 'prefix' => 'laravel', | 85 | + 'prefix' => env('CACHE_PREFIX', 'bookstack'), |
| 87 | 86 | ||
| 88 | ]; | 87 | ]; | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | +// REDIS - Split out configuration into an array | ||
| 4 | +if (env('REDIS_SERVERS', false)) { | ||
| 5 | + $redisServerKeys = ['host', 'port', 'database']; | ||
| 6 | + $redisServers = explode(',', trim(env('REDIS_SERVERS', '127.0.0.1:6379:0'), ',')); | ||
| 7 | + $redisConfig = [ | ||
| 8 | + 'cluster' => env('REDIS_CLUSTER', false) | ||
| 9 | + ]; | ||
| 10 | + foreach ($redisServers as $index => $redisServer) { | ||
| 11 | + $redisServerName = ($index === 0) ? 'default' : 'redis-server-' . $index; | ||
| 12 | + $redisServerDetails = explode(':', $redisServer); | ||
| 13 | + if (count($redisServerDetails) < 2) $redisServerDetails[] = '6379'; | ||
| 14 | + if (count($redisServerDetails) < 3) $redisServerDetails[] = '0'; | ||
| 15 | + $redisConfig[$redisServerName] = array_combine($redisServerKeys, $redisServerDetails); | ||
| 16 | + } | ||
| 17 | +} | ||
| 18 | + | ||
| 3 | return [ | 19 | return [ |
| 4 | 20 | ||
| 5 | /* | 21 | /* |
| ... | @@ -123,16 +139,6 @@ return [ | ... | @@ -123,16 +139,6 @@ return [ |
| 123 | | | 139 | | |
| 124 | */ | 140 | */ |
| 125 | 141 | ||
| 126 | - 'redis' => [ | 142 | + 'redis' => $redisConfig, |
| 127 | - | ||
| 128 | - 'cluster' => false, | ||
| 129 | - | ||
| 130 | - 'default' => [ | ||
| 131 | - 'host' => '127.0.0.1', | ||
| 132 | - 'port' => 6379, | ||
| 133 | - 'database' => 0, | ||
| 134 | - ], | ||
| 135 | - | ||
| 136 | - ], | ||
| 137 | 143 | ||
| 138 | ]; | 144 | ]; | ... | ... |
-
Please register or sign in to post a comment