Re: [Rails] Caching and .includes()

2016-12-07 Thread Scott Jacobsen
On Sun, Dec 04, 2016 at 11:35:38AM -0800, Brian Christian wrote: > I’ve noticed that in my applications I often have to choose between the > efficiency of caching and the efficiency of the .includes() method, and I’m > wondering if these two are mutually exclusive. Am I doing something wrong? > > H

[Rails] Caching and .includes()

2016-12-04 Thread Brian Christian
I’ve noticed that in my applications I often have to choose between the efficiency of caching and the efficiency of the .includes() method, and I’m wondering if these two are mutually exclusive. Am I doing something wrong? Here’s an example. Let’s say I’ve got a Posts model, and each Post has_ma