diff options
| author | Ryan Nowakowski <tubaman@fattuba.com> | 2019-09-24 05:42:43 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-09-24 12:43:57 +0200 |
| commit | f314cebe82902f2afcf4b2ae6f3ea069e6bfd19a (patch) | |
| tree | ce8c4dff792348148ac37f4a70962208d3c985bc /docs | |
| parent | 29d2f5a66212af91f93edb47df07982f92b4ac5f (diff) | |
[2.2.x] Updated the default cache key transformation in documentation.
Follow up to 6c69de80bdcd2744bc64cb933c2d863dd5e74a33.
Backport of 3f141719a198983a41840e3c2ea542f87c92e4c1 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/cache.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt index 6827b3f40e..33e0f72e95 100644 --- a/docs/topics/cache.txt +++ b/docs/topics/cache.txt @@ -1038,7 +1038,7 @@ key version to provide a final cache key. By default, the three parts are joined using colons to produce a final string:: def make_key(key, key_prefix, version): - return ':'.join([key_prefix, str(version), key]) + return '%s:%s:%s' % (key_prefix, version, key) If you want to combine the parts in different ways, or apply other processing to the final key (e.g., taking a hash digest of the key |
