summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/settings.txt4
-rw-r--r--docs/releases/1.7.txt5
-rw-r--r--docs/topics/cache.txt9
3 files changed, 16 insertions, 2 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 27bc2274dc..f01ce3c7fd 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -255,6 +255,10 @@ Default: 300
The number of seconds before a cache entry is considered stale.
+.. versionadded:: 1.7
+
+If the value of this settings is ``None``, cache entries will not expire.
+
.. setting:: CACHES-VERSION
VERSION
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index a8bf154421..441a39616a 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -441,6 +441,11 @@ Cache
thread-safe any more, as :data:`django.core.cache.caches` now yields
different instances per thread.
+* Defining the :setting:`TIMEOUT <CACHES-TIMEOUT>` argument of the
+ :setting:`CACHES` setting as ``None`` will set the cache keys as
+ "non-expiring" by default. Previously, it was only possible to pass
+ ``timeout=None` to the cache backend's ``set()`` method.
+
Email
^^^^^
diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt
index 97c54918cd..2ebc015c75 100644
--- a/docs/topics/cache.txt
+++ b/docs/topics/cache.txt
@@ -363,9 +363,14 @@ Each cache backend can be given additional arguments to control caching
behavior. These arguments are provided as additional keys in the
:setting:`CACHES` setting. Valid arguments are as follows:
+
* :setting:`TIMEOUT <CACHES-TIMEOUT>`: The default timeout, in
- seconds, to use for the cache. This argument defaults to ``300``
- seconds (5 minutes).
+ seconds, to use for the cache. This argument defaults to ``300`` seconds (5 minutes).
+
+ .. versionadded:: 1.7
+
+ You can set ``TIMEOUT`` to ``None`` so that, by default, cache keys never
+ expire.
* :setting:`OPTIONS <CACHES-OPTIONS>`: Any options that should be
passed to the cache backend. The list of valid options will vary