Skip to content

no way to set msgpack max_bin_len limits use of cache to small files #200

@cdent

Description

@cdent

When trying to use cachecontrol with very large files (disk images in the case I'm considering), there's no easy way to pass a max_bin_len to msgpack.loads to say "yeah, I really do want to be able to load huge files".

cachecontrol will write the huge files, but then when it comes round to read them, msgpack will produce a ValueError and cachecontrol will return None to the deserialization routines.

It appears that the way to hack around it would be to subclass Serializer and replace loads_v4 to give some args to msgpack.loads.

Is there a better way? Is this something that you'd be interested in seeing as a kwarg passed down from CacheControl?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions