29.07.2016 Views

laravel-5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Redis<br />

• Introduction<br />

• Basic Usage A> - Pipelining Commands<br />

• Pub / Sub<br />

Introduction<br />

Redis¹⁷⁰ is an open source, advanced key-value store. It is often referred to as a data structure server<br />

since keys can contain strings¹⁷¹, hashes¹⁷², lists¹⁷³, sets¹⁷⁴, and sorted sets¹⁷⁵. Before using Redis with<br />

Laravel, you will need to install the predis/predis package (∼1.0) via Composer.<br />

Configuration<br />

The Redis configuration for your application is located in the config/database.php configuration<br />

file. Within this file, you will see a redis array containing the Redis servers used by your application:<br />

.<br />

1 'redis' => [<br />

2<br />

3 'cluster' => false,<br />

4<br />

5 'default' => [<br />

6 'host' => '127.0.0.1',<br />

7 'port' => 6379,<br />

8 'database' => 0,<br />

9 ],<br />

10<br />

11 ],<br />

¹⁷⁰http://redis.io<br />

¹⁷¹http://redis.io/topics/data-types#strings<br />

¹⁷²http://redis.io/topics/data-types#hashes<br />

¹⁷³http://redis.io/topics/data-types#lists<br />

¹⁷⁴http://redis.io/topics/data-types#sets<br />

¹⁷⁵http://redis.io/topics/data-types#sorted-sets

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!