[Rails] Is it possible to serialize an ActiveRecord object?

2019-12-03 Thread Daniel Baez
Hello, Lets say that I have a model class like `Car < ActiveRecord::Base` and then, I want to extend it with an abstract class in between a sort of `Car < CacheableActiveRecord::Base < ActiveRecord::Base` In `CacheableActiveRecord::Base` I'll overwrite methods like `find_by`, `find_by!` and

[Rails] [JOB] Ruby Developer in Netherlands, Amsterdam

2019-12-03 Thread Nina Shcherbakova
Description Founded in 2013, our client is one of the fastest-growing B2B education platforms in the Netherlands. The platform connects experts, training organisations HR professionals and employees in order to facilitate all learning needs within companies. Their current goal is to add more

[Rails] Re: Is it possible to serialize an ActiveRecord object?

2019-12-03 Thread Adam Lassek
It might be *possible* but I would strongly suggest rethinking this. What is going wrong with your DB that its built-in caching is insufficient? Have you exhausted your performance-tuning options in the DB layer? Have you measured a significant performance problem in the first place? Do you

[Rails] Re: Is it possible to serialize an ActiveRecord object?

2019-12-03 Thread Daniel Baez
Hi Adam, thanks for answering About the questions: - What is going wrong with your DB that its built-in caching is insufficient? - Load, there are millions of queries running a sec now, and the Active Model classes I want to update are read constantly but hardly ever

[Rails] Re: Is it possible to serialize an ActiveRecord object?

2019-12-03 Thread San Ji
Most of the time, as Adam suggested, the database would do this for you already. But if it does not works, your table is just so large; it won't fit in the memory. (I guess) If the situation allow, try adding more memory to the database instances. If the size of your data is not in the same