Skip to content

With introduction of threading in 4.42.0, I can no longer cache the results of gateway.customer.find() in redis (which pickles the object) #168

@teewuane

Description

@teewuane

customer = gateway.customer.find("the_id_of_customer")

Try to store the result of this in redis to be used later.

cache.set("braintree_customer_id", customer, 60*60*24)

This is because customer now represents a thread-local object, before it did not. Redis tries to pickle the object for storage but it can not pickle a thread-local object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions