Skip to main content

clear_cache_handlers

Resets and reconfigures Django cache handlers when the CACHES setting is modified, ensuring that existing connections are closed and new settings are applied.

def clear_cache_handlers(
setting: string,
**kwargs: dict
) - > null

Resets and reconfigures Django's cache connection handlers when the CACHES setting is modified. This ensures that any existing cache connections are closed and that the cache manager is re-initialized with the updated configuration settings.

Parameters

NameTypeDescription
settingstringThe name of the Django setting that was changed, used to trigger the reset only when 'CACHES' is modified.
**kwargsdictAdditional keyword arguments passed by the setting_changed signal dispatcher.

Returns

TypeDescription
nullNothing is returned; the function performs an in-place reset of the global cache state.