codenoble / cache-crispies

Speedy Rails JSON serialization with built-in caching
MIT License
156 stars 15 forks source link

Polymorphic collections #28

Open floriandejonckheere opened 4 years ago

floriandejonckheere commented 4 years ago

Cache crispies currently does not support polymorphic collections. Is this a feature that will be implemented in the future?

uxxman commented 4 years ago

Also, looking for a similar thing for an STI relation. Each subclass has a different serializer but no option to specify them for a collection

adamcrown commented 3 years ago

Hmm, that's an interesting thought. I'll have to poke around and see how this could be handled. For performance reasons, the gem is designed to do as much of the work as possible up front, rather than having to repeat work on each record. So I'll have to see how well I can make this work within that paradigm.