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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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