Code

Ticket #11503: 11503-docs.diff

File 11503-docs.diff, 741 bytes (added by DavidReynolds, 5 years ago)

Tiny documentation patch describing .flush()

Line 
1diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt
2index 174dbae..9f0b55b 100644
3--- a/docs/topics/cache.txt
4+++ b/docs/topics/cache.txt
5@@ -510,11 +510,16 @@ actually exist in the cache (and haven't expired)::
6     >>> cache.get_many(['a', 'b', 'c'])
7     {'a': 1, 'b': 2, 'c': 3}
8 
9-Finally, you can delete keys explicitly with ``delete()``. This is an easy way
10+You can delete keys explicitly with ``delete()``. This is an easy way
11 of clearing the cache for a particular object::
12 
13     >>> cache.delete('a')
14 
15+Finally, if you need to remove everything in the cache you can use
16+the``flush()`` method::
17+
18+    >>> cache.flush()
19+
20 .. versionadded:: 1.1
21 
22 You can also increment or decrement a key that already exists using the