Answer the question
In order to leave comments, you need to log in
How can one quickly serialize/deserialize the result of a queryset given prefetch_related?
The built-in jung cache backends use pickle for serialization, which is convenient, but slow.
I need some fast way. Of course, you can use .values() and somehow serialize it to JSON, it should be faster, but this is complicated by the fact that I have related objects pulled out using prefetch_related. Of course, you can write a serializer by hand, but what if there is something ready?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question