Skip to content

Commit

Permalink
Mention PhpRedis and false negatives.
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss authored Jan 7, 2017
1 parent a2a5b5d commit 9a368a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ You may also set the `host` option to a UNIX socket path. If you do this, the `p

#### Redis

Before using a Redis cache with Laravel, you will need to install the `predis/predis` package (~1.0) via Composer.
Before using a Redis cache with Laravel, you will need to either install the `predis/predis` package (~1.0) via Composer, or install the PhpRedis PHP extension via PECL.

For more information on configuring Redis, consult its [Laravel documentation page](/docs/{{version}}/redis#configuration).

Expand Down Expand Up @@ -168,6 +168,8 @@ Instead of passing the number of minutes as an integer, you may also pass a `Dat

Cache::put('key', 'value', $expiresAt);

> {note} Storing `false` or `null` values will lead to false negatives, because Laravel treats both as a null value.
#### Store If Not Present

The `add` method will only add the item to the cache if it does not already exist in the cache store. The method will return `true` if the item is actually added to the cache. Otherwise, the method will return `false`:
Expand Down

0 comments on commit 9a368a0

Please sign in to comment.