Skip to content

Client-side caching doesn't work when using bytes keys #3618

Open
@jnrbsn

Description

@jnrbsn

When using bytes objects as keys, client-side caching doesn't work, because when trying to invalidate the cache, it unconditionally decodes bytes to str objects. This should probably be the other way around (i.e. encode all str keys as utf-8 and only store bytes keys in the cache). This would allow the use of str and bytes keys interchangeably for the vast majority of cases, unless someone is interchangeably using str keys and non-utf-8-encoded bytes keys, in which case they should probably stick with one or the other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions