Skip to content

Commit 1cfbe4f

Browse files
igbinary serialization support
1 parent 6fc00c3 commit 1cfbe4f

File tree

4 files changed

+1055
-416
lines changed

4 files changed

+1055
-416
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Next, you will need to change the `guards` and `providers` arrays in your `confi
4848
'providers' => [
4949
'users' => [
5050
'driver' => 'jwt_redis_user_provider',
51-
'model' => App\User::class, /* Your User Model */
51+
'model' => App\User::class, // Your User Model
5252
],
5353
],
5454
```
@@ -185,6 +185,21 @@ You can customize some options in that package. Check `config/jwtredis.php` file
185185
*/
186186
'redis_auth_prefix' => 'auth_',
187187
```
188+
* Serialization
189+
```php
190+
/*
191+
|--------------------------------------------------------------------------
192+
| Igbinary Serialization
193+
|--------------------------------------------------------------------------
194+
|
195+
| Igbinary Serialization provides a better performance and lower memory
196+
| usage than PHP Serialization.
197+
|
198+
| * ~ Don't forget to enable igbinary extension if this option is true. ~ *
199+
|
200+
*/
201+
'igbinary_serialization' => false,
202+
```
188203
* Banned User Check
189204
```php
190205
/*
@@ -272,7 +287,7 @@ You may install the PhpRedis PHP extension via PECL. The extension is more compl
272287

273288
"PhpRedis is faster about x6 times. Using igbinary serializer reduces stored data size about 3x times. If Redis installed on separate machines, reducing network traffic is a very significant speedup."
274289

275-
In my opinion, using [PhpRedis](https://github.com/phpredis/phpredis) and serializer as igbinary ([Lodash](https://github.com/akalongman/laravel-lodash) package it provide this for Laravel.) in production environment gives a great performance.
290+
In my opinion, using [PhpRedis](https://github.com/phpredis/phpredis) and serializer as igbinary ( Laravel does not support igbinary serialization on Redis. However, this package provides igbinary serialization support for Laravel. Please check `config/jwtredis.php` file. ) in production environment gives a great performance.
276291

277292
You can review this [article](https://medium.com/@akalongman/phpredis-vs-predis-comparison-on-real-production-data-a819b48cbadb) for performance comparison [PhpRedis](https://github.com/phpredis/phpredis) vs. [Predis](https://github.com/nrk/predis).
278293

0 commit comments

Comments
 (0)