4 ms·
this is a great article > The most often-used method of all Rails cache stores is fetch It's true, but I think you should add performance tests while the app
by resca79 11y ago
this is a great article
> The most often-used method of all Rails cache stores is fetch
It's true, but I think you should add performance tests while the app write/read
because the big problem of db/cache is the write that influence also the read(fetch).
Another big problem is the expiration vs garbage collection after the memory is full.
- pselbert 11y agoA request with dozens or hundreds of `fetch` calls will always be slower than a few `fetch_multi` or `read_multi` calls. All of the current ActiveSupport compliant libraries support both calls.
- resca79 11y agoSure! but I mean many reads and writes load the cache db server, and the curve is exponential not linear
- ghiculescu 11y agoWe've found https://github.com/n8/multi_fetch_fragments https://github.com/n8/multi_fetch_fragments to be quite handy for this.