From 9a368a0cf4f4f873f4f4160ad0eeeb8ff9c46d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Sat, 7 Jan 2017 08:44:35 -0800 Subject: [PATCH] Mention PhpRedis and false negatives. --- cache.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cache.md b/cache.md index 2cdb0ffd013..0f9941e09c9 100644 --- a/cache.md +++ b/cache.md @@ -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). @@ -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`: