From bc4e675935a65ff1842b2fc572ff65fb0aeee815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 19 Jan 2017 22:57:09 +0100 Subject: [PATCH] Add warning about mutating cache values issue6186 review29931002 --- doc/ref/cache.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/ref/cache.rst b/doc/ref/cache.rst index e151d6862e..83ab6858a5 100644 --- a/doc/ref/cache.rst +++ b/doc/ref/cache.rst @@ -14,6 +14,11 @@ be used to limit the number of values cached and the `context` parameter is used to indicate if the cache depends on the user context and is true by default. +.. warning:: + As there is no deepcopy of the values cached, they must never be mutated + after being set in or retrieved from the cache. +.. + .. method:: get(key[, default]) Retrieve the value of the key in the cache. If a `default` is specified it