Comment by xutopia
1 year ago
For caching specifically solid_cache works better for long lived and larger caches than does Redis. If you need short lived and smaller caches Redis will be more performant for you.
That said you can probably get away with caching way more with solid_cache and it's highly dependent on what your use cases are.
Also a thing to note that your DB backing solid_cache might also be using RAM efficiently, giving you a lot of benefits that Redis did.
For new projects I'll be using solid_cache first and adding Redis only on an as-need basis. The cost of Redis is orders of magnitude higher than a DB backed cache.
Thanks for this. I've run into "giant cache" issues in the past in this exact use case. I'll give solid_cache a look.
DHH mentioned 10TB of cache and only 0.5ms increase in latency difference between Redis and SQLite. I wish other could test it out and have some other figures to point to. But if the stated case were true then I think sacrifice 0.5ms for 10 to 20x more cached resources sounds like a very good deal to me.