Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Iterable caches might grow without bound #9026

@clokep

Description

@clokep

Iterable caches are configured to count each entry as the number of underlying items in the iterable, aka a list of [1, 2, 3] counts as 3 items in the cache (not 1). Currently an empty iterable ends up counting as 0 items in the cache, which could cause the cache to use much more memory than expected.

A potential solution could be to do len(d) or 1 which would ensure any item in the cache counts as at least 1 item toward the cache limit.

Metadata

Metadata

Assignees

Labels

A-PerformancePerformance, both client-facing and admin-facing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions