﻿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
36020	redis cache backend serializing floats	amirreza		"hi
so as you know django's redis backend [https://github.com/django/django/blob/main/django/core/cache/backends/redis.py#L19-L27] doesn't serialize int values, this is to support atomic integer operation as discussed at [https://github.com/django/django/pull/14437#issuecomment-915046037] and below.

but redis also has float operations, such as `incrbyfloat`, and since django serializes floats these operations are not possible, at least not without some hassle

we can easily address this by not serializing floats

worth mentioning that i've recently done the same thing in `django-valkey` [https://github.com/amirreza8002/django-valkey/blob/main/django_valkey/base_client.py#L527-L552], and from what i can tell, it makes no difference for users and doesn't break anything.

let me know what you think"	Cleanup/optimization	closed	Core (Cache system)	5.1	Normal	wontfix		Nick Pope	Unreviewed	0	0	0	0	1	0
