From 4513a6c2a9694b3da144846f3edfa1c3673a181d Mon Sep 17 00:00:00 2001 From: Mike Edmunds Date: Wed, 18 Feb 2026 10:15:31 -0800 Subject: [PATCH] Refs #19221 -- Fixed outdated KEY_FUNCTION definition in docs/ref/settings.txt. Replaced outdated version of `default_key_func` in settings reference with pointer to current version in cache topic. Rewrote description to match parameter order and behavior of default implementation. Co-authored-by: nessita <124304+nessita@users.noreply.github.com> --- docs/ref/settings.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index fe3792bc5cd5..320ec7f83e44 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -169,18 +169,13 @@ backend class (i.e. ``mypackage.backends.whatever.WhateverCache``). ~~~~~~~~~~~~~~~~ A string containing a dotted path to a function (or any callable) that defines -how to compose a prefix, version and key into a final cache key. The default -implementation is equivalent to the function:: - - def make_key(key, key_prefix, version): - return ":".join([key_prefix, str(version), key]) +how to compose a key, prefix, and version into a final cache key. The default +function converts the components to strings and joins them with colons, as +shown in the :ref:`cache documentation `. You may use any key function you want, as long as it has the same argument signature. -See the :ref:`cache documentation ` for more -information. - .. setting:: CACHES-KEY_PREFIX ``KEY_PREFIX``