clear_routers_cache
Clears and reinitializes the cached database routers when the DATABASE_ROUTERS setting is modified.
def clear_routers_cache(
setting: string,
kwargs: dict
) - > null
Clears and reinitializes the cached list of database routers whenever the DATABASE_ROUTERS setting is modified.
Parameters
| Name | Type | Description |
|---|---|---|
| setting | string | The name of the Django setting that was changed, used to trigger the cache refresh only when DATABASE_ROUTERS is updated. |
| kwargs | dict | Additional keyword arguments passed by the setting_changed signal receiver. |
Returns
| Type | Description |
|---|---|
null | Nothing is returned; the function modifies the global router state in-place. |