﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37113	Don't let cache backends swallow explicit errors in cache arguments	jodizzle	jodizzle	"The following [https://docs.djangoproject.com/en/6.0/topics/cache/#cache-arguments cache arguments]

- `TIMEOUT`
- `OPTIONS['MAX_ENTRIES']`
- `OPTIONS['CULL_FREQUENCY']`

are integer values that are handled by [https://github.com/django/django/blob/3e4e0db66961a48a080ff3ff91f6c0d954261366/django/core/cache/backends/base.py#L66 `BaseCache`] such that non-integer values are ignored and fallback to the default.  For example:

- If a Django app didn't set a `TIMEOUT` for the caching backend, the cache timeout would be set to `300`, the default;
- If a Django app set a `TIMEOUT` for the caching backend to `0`, the cache timeout would be set to `0`, as expected;
- If a Django app somehow set a `TIMEOUT` of `'abc'`, the cache timeout would be set to `300`.

My feeling is that the third behavior is wrong.  If any of these settings can't be parsed by Django as an integer, Django should throw an error to make it clear to the user that the app is improperly configured.

I'll also note:
- This behavior does not seem to be documented.  The cache arguments section of the documentation mentions the default values, and makes it fairly clear that the settings are for integers, but it doesn't mention that inappropriate values are forced to the defaults.
- This behavior does not seem to be tested in the test suite.  If the error swallowing logic is removed, the test suite still passes."	Cleanup/optimization	assigned	Core (Cache system)	dev	Normal			jodizzle	Unreviewed	0	0	0	0	0	0
