From 4e3e1086a90627052265f7140de6ce9d8a159512 Mon Sep 17 00:00:00 2001 From: xpyoda <122009162+xpyoda@users.noreply.github.com> Date: Thu, 5 Jan 2023 17:38:24 +0900 Subject: [PATCH] The description of the return value of Cache::read() is incorrect. Cache::read() returns 'null' if the cache has expired or does not exist. Not 'false'. --- ja/core-libraries/caching.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/core-libraries/caching.rst b/ja/core-libraries/caching.rst index 92b3a20ac8..2e636c4cf1 100644 --- a/ja/core-libraries/caching.rst +++ b/ja/core-libraries/caching.rst @@ -326,7 +326,7 @@ Cache を使用すると、Read-through キャッシュを簡単に行うこと ``Cache::read()`` は、 ``$key`` 配下に格納されたキャッシュされた値を ``$config`` から読み込むために使用されます。 ``$config`` が null の場合、 デフォルトの設定が使用されます。 ``Cache::read()`` は、有効なキャッシュであれば -キャッシュされた値を返し、キャッシュが期限切れになっているか存在しない場合は ``false`` を返します。 +キャッシュされた値を返し、キャッシュが期限切れになっているか存在しない場合は ``null`` を返します。 キャッシュの内容は false と評価される可能性があるので、必ず厳密な比較演算子 ``===`` または ``!==`` を使用してください。