Skip to content

Commit

Permalink
[3.0.x] Updated the default cache key transformation in documentation.
Browse files Browse the repository at this point in the history
Follow up to 6c69de8.
Backport of 3f14171 from master
  • Loading branch information
tubaman authored and felixxm committed Sep 24, 2019
1 parent 1319124 commit 525c7e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/topics/cache.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,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
Expand Down

0 comments on commit 525c7e2

Please sign in to comment.